The error I am getting is: DatabaseSchemaObjectExistsException: Table field_data_media_gallery_media already exists. in DatabaseSchema->createTable() (line 621 of /var/www/lewin.nu/cms/drupal-7.0-beta2/includes/database/schema.inc).

The module installs, even if it does not seem to work properly (for example no lightbox). I am unable to say if the problems with the module are due to this error or to the advertised "high instability" of the module...

Comments

tscherk’s picture

Version: 7.x-1.0-beta2 » 7.x-1.0-beta3

i have the same problem in the version 7.x-1.0-beta3.

how to release this problem? can somebody help?

johacami’s picture

Yep, same here: Error message displayed after trying to upload an image:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'temporary://yf1.jpg' for key 'uri': INSERT INTO {file_managed} (uid, filename, uri, filemime, filesize, status, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => yf1.jpg [:db_insert_placeholder_2] => temporary://yf1.jpg [:db_insert_placeholder_3] => image/jpeg [:db_insert_placeholder_4] => 3508 [:db_insert_placeholder_5] => 0 [:db_insert_placeholder_6] => 1300028972 ) in drupal_write_record() (line 6776 of C:\xx\web\pagename\includes\common.inc).

calbert’s picture

Priority: Normal » Major

I am getting this same error is there any update to this? Running Drupal 7 and for me I can't get it to work AT all, unlike the OP'er

DatabaseSchemaObjectExistsException: Table field_data_media_gallery_media already exists. in DatabaseSchema->createTable() (line 630 of /var/www/vhosts/metrosource/drupal-7.0/includes/database/schema.inc).

calbert’s picture

Title: Media Gallery installs but throws an error. » DatabaseSchemaObjectExistsException: Table field_data_media_gallery_media already exists. in DatabaseSchema

Updating this title.

calbert’s picture

Version: 7.x-1.0-beta3 » 7.x-1.0-beta4
damienroussat’s picture

Version: 7.x-1.0-beta4 » 7.x-1.0-beta7

Hi there,

Still have the problem with beta7. This problem only occurs after desinstalling then reinstalling the module.
Core D7.9 with Media_Gallery beta7.

Except for me the problem is on table media_gallery_weight.
Suscribing. Does anyone would know how to patch that ?

Thank you very much

lsolesen’s picture

Status: Active » Postponed (maintainer needs more info)

This must be due to the table not removed when uninstalling. Any of you could make an uninstall task, which takes care of this?

lsolesen’s picture

Title: DatabaseSchemaObjectExistsException: Table field_data_media_gallery_media already exists. in DatabaseSchema » field_data_media_gallery_media not removed on uninstall
lsolesen’s picture

Should that field be removed #1015846: Module should not delete fields on uninstall on uninstall, or should there be a check for it on install?

lsolesen’s picture

Issue tags: +Beta8-blockers

Tagging.

lsolesen’s picture

Issue tags: -Beta8-blockers +Beta9-blocker

Retagging.

lsolesen’s picture

Issue tags: -Beta9-blocker +Beta10-blockers

Retagging.

mile23’s picture

I'd say this needs a refactoring, so that at least the field implementation is a separate module rather than an include. Then Drupal can deal with the dependency problems.

In fact, separating out both the field and the node, in addition to a third abstract module with all the meat, would be best. It would let people, for instance, use the field without having an extra content type.

Of course, it's a load of work. :-)

sparker888’s picture

Issue summary: View changes

After following some best-practice procedures for removing modules (removing content, referencing fields, taxonomy, dependencies, etc.), after removing the Media Gallery 7.x-1.x-dev, I was left with quite a few tables in the database:

field_data_media_gallery_block_columns
field_data_media_gallery_block_rows
field_data_media_gallery_columns
field_data_media_gallery_description
field_data_media_gallery_expose_block
field_data_media_gallery_format
field_data_media_gallery_image_info_where
field_data_media_gallery_lightbox_extras
field_data_media_gallery_media
field_data_media_gallery_rows

When I go to admin/reports/fields it gives me an error for each one:

Notice: Undefined index: media_gallery in _field_ui_bundle_admin_path() (line 325 of ...\modules\field_ui\field_ui.module).
Notice: Undefined index: media_gallery in field_ui_fields_list() (line 35 of ...\modules\field_ui\field_ui.admin.inc).

In the field list on that page, nothing shows up for 'Used In' so it doesn't appear as if these fields are used anywhere in my system, yet they persist. I tried removing the tables directly from the database (not a good practice btw), but that gives me errors. If anyone knows a way to remove these tables safely, I'd appreciate the tutorial!

Furthermore, after working with the Media Gallery module for some time, I had quite a few problems doing advanced views and other things with it. As the module is still in development (and only for Drupal Gardens - it appears that Acquia is not interested in advancing this for the entire community anytime soon), I recommend using another gallery solution.

ivnish’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)
Issue tags: -