Impossible to install this module. I've used tons of modules majors and minors, a lot of them in -dev- version, i've never encounter such a difficulty to install one like with media-gallery, and none of them made me never doubt about drupal's robustness, but with this module it's another matter.
I've already reported here Trying to get property of non-object in taxonomy_form_term() some of the problems, an issue started with 7.x-1.0-beta7 three years ago and still live.
I love the module's features and also the way media module is build, so I continued my efforts to make it work. I ended with :

EntityFieldQueryException : unknown field: media_gallery_expose_block dans EntityFieldQuery->addFieldCondition() (line779 in /home/.../includes/entity.inc).

and before that :
PDOException : SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction: DELETE FROM {cache_bootstrap} WHERE (cid = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => variables ) in cache_clear_all() (line 165 in /home/../includes/cache.inc).

I suppose this is while executing line 60 of media_gallery.install
57 // Clear caches so that our implementation of hook_image_default_styles() is
58 // correctly used when all the fields created below need it to be.
59 // @todo There should obviously be a cleaner way to do this.
60 cache_clear_all('*', 'cache', TRUE);

After that I was even unable to clear cache manually (configuration/performance/cache) and finished with the mysql server crashed.

Some other issues: DatabaseSchemaObjectExistsException : Table field_data_media_gallery_description already exist in DatabaseSchema->createTable()

Comments

erwangel’s picture

Sorry for being so aggressive with this bug report, but I lost my entire weekend trying to install media_gallery. Hope my experience help some other and perhaps give some ideas to maintainers to improve the usability of this gallery.
All its features, all interesting, deserve more care of his code and of following its compatibility with media module.

After a lot of debugging, the problem was in the description field that media gallery installs which conflicts with a field of the same name that media module installs.

This prevents media gallery to install correctly and I was unable to uninstall.
Here is the solution I came. I'm rather new in drupal and I don't know yet making patches. Waiting a patch, here are the steps I followed.

WARNING: Don't use the method below if you are upgrading from an older version, and if you have already created some galleries. This method will make you loose all your gallery's data. Method below is intended for Media gallery 7.x-2.x-dev working with Media module 7.x-2.0-alpha3+106-dev and later. With other configurations, this may work, this may not.

- Installation
1) we need to move extra media fields that the module installs to a non conflicting namespace : change all occurrences in all files of media_title, media_description, media_license to field_file_title, field_file_description, field_file_license. There are not so many occurences, most are located in .install file, then some in .module, .fields.inc, .pages.inc and .theme.inc
ATTENTION: if you're going with a find/replace way, go step-by-step and take care to not change any functions name that may contain the "search" terms.
Enable the module, better with "drush en media_gallery"
That's all !

Well, easy isn't it ? It could if install was working correctly. Because, if you have already proceed an installation before the above changes, it may be hard to uninstall. That's why it's better to go with drush. Faster if you have to repeat several times and you get better error messages.

- Manual Uninstall

First try disabling and then uninstalling the module
1) drush dis media_gallery
2) drush pm-uninstall media_gallery
You may get some error messages. Let it go.
3) In the backend verify if you have a taxonomy vocabulary named "gallery collections". If so, delete it.
4) Make a manual verification of the database
4a) table field_config: look for any field_name containing media_gallery%. If you are sure they belong to the module delete them
4b) If you have made an installation after the changes mentioned in "installation" step above, then in the same table look also for records of field_file%. If you find any field_file_title, field_file_description or field_file_license and you are sure they have not been created by something else, then delete them
4c) Idem with 4a and 4b but within table field_config_instance
4d) Look for tables field_data_field_file_title, field_data_field_file_description, field_data_field_file_license. If you find any, delete them
4e) Delete all tables starting with field_data_media_gallery_*
4f) If you use revisioning, redo 4d and 4e with field_revision_field_file_(title, description, license) and field_revision_media_gallery_*
5) Let's change numbering :)
5a) Look for table media_gallery_weight and delete it
6) Inside table system, look for "media_gallery". If it's schema_version (field) is not -1, delete it. If it is -1 your do as you like :) (delete it or leave it, your two choices)
7) Inside table variables look for %gallery% (not only %media_gallery%). If you are sure they were produced by the media gallery module, delete them.
8) Nothing else, you've finished cleaning.

After that you can reenable the module (drush en media_gallery). It should reinstall all tables without problem. If you see any errors, don't go further ; you (or me) may forgot something in cleaning, verify steps 1) to 8). Don't try to create nodes (galleries are nodes) if installation was not clean. The less data you create, easier will be the cleaning (remember uninstall doesn't work correctly in installation was not okay, so on each try you have to uninstall manually). But, after all that sentence, you can enjoy your new shining media gallery !

ivnish’s picture

Status: Active » Closed (outdated)