Tried with both Drupal 7.2 and 7.4.
When I update my modules and enable File Entity module I get the following error message:
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'file_type': ALTER TABLE {file_managed} CHANGE `type` `type` VARCHAR(50) NOT NULL DEFAULT '' COMMENT 'The type of this file.', ADD INDEX `file_type` (`type`); Array ( ) in db_change_field() (line 2944 of /var/www/mysite/includes/database/database.inc).
Then I get a series of error messages on my pages, and now my media_gallery is broke:
* Notice: Undefined property: stdClass::$uri in file_styles_styles_filter() (line 33 of /var/www/mysite/sites/all/modules/styles/contrib/file_styles/file_styles.module).
* Notice: Undefined property: stdClass::$filemime in file_styles_styles_filter() (line 49 of /var/www/mysite/sites/all/modules/styles/contrib/file_styles/file_styles.module).
* Notice: Undefined property: stdClass::$uri in file_styles_styles_filter() (line 33 of /var/www/mysite/sites/all/modules/styles/contrib/file_styles/file_styles.module).
* Notice: Undefined property: stdClass::$filemime in file_styles_styles_filter() (line 49 of /var/www/mysite/sites/all/modules/styles/contrib/file_styles/file_styles.module).
I tried rolling my database/files right back to a stage before I installed Media and dependent modules (starting from scratch) but I got the following error messages when I installed the modules again and tried enabling Media and File Entity:
* Notice: Undefined index: bundles in field_info_bundles() (line 579 of /var/www/mysite/modules/field/field.info.inc).
* Warning: Invalid argument supplied for foreach() in _field_info_collate_fields() (line 216 of /var/www/mysite/modules/field/field.info.inc).
* Notice: Undefined index: field_name in field_update_instance() (line 522 of /var/www/mysite/modules/field/field.crud.inc).
* Notice: Undefined index: field_name in field_update_instance() (line 524 of /var/www/mysite/modules/field/field.crud.inc).
* FieldException: Attempt to update an instance of a nonexistent field . in field_update_instance() (line 524 of /var/www/mysite/modules/field/field.crud.inc).
I have installed the following related modules:
Media (File entity too with Media Beta 5)
Media Browser plus
Media gallery
Media Internet Sources
Multiple forms
File Styles
Styles
Styles UI
Any support would be much appreciated.
Comments
Comment #1
mesr01 commentedSame here. I got the following errors while updating the database (update.php):
Comment #2
Carlos Miranda Levy commentedI got the same notices when upgrading.
Comment #3
dlumberg commentedI got these running update.php
With the return value
And when I try to load the manage fields page for content that has "field_image_field" I get
Comment #4
sapelzin commentedI have the same problems as others, and Galleries are broken as well...
Trying to get property of non-object in theme_media_gallery_block_thumbnail() (line 353 of /home/ace1950/public_html/sites/all/modules/media_gallery/media_gallery.theme.inc).
Comment #5
madeby commentedGot same error, any suggestions?
Comment #6
Tuscan commentedSo I can't uninstall Media beta 4 else that screws up the database due to an earlier bug right? And if I update to Beta 5, the moment I try to enable "File entity" module (that beta 5 comes with and now depends on) I just get this pop up error:
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'file_type': ALTER TABLE {file_managed} CHANGE `type` `type` VARCHAR(50) NOT NULL DEFAULT '' COMMENT 'The type of this file.', ADD INDEX `file_type` (`type`); Array ( ) in db_change_field() (line 2944 of /var/www/mysite/includes/database/database.inc).
Then I get a series of error messages on my pages that look like this:
* Notice: Undefined property: stdClass::$uri in file_styles_styles_filter() (line 33 of /var/www/mysite/sites/all/modules/styles/contrib/file_styles/file_styles.module).
* Notice: Undefined property: stdClass::$filemime in file_styles_styles_filter() (line 49 of /var/www/mysite/sites/all/modules/styles/contrib/file_styles/file_styles.module).
So.. i'v hit a dead end..
1. Is anyone else seeing these particular errors? If so which ones?
2. Does anyone know what might be the cause?
3. Are they fixable? Or should I need to roll back my site?
Even if I do roll back my site to a state before Media was installed, I still get these errors when I enable Media Beta 5 + File Entity:
Notice: Undefined index: bundles in field_info_bundles() (line 579 of /var/www/mysite/modules/field/field.info.inc).
Warning: Invalid argument supplied for foreach() in _field_info_collate_fields() (line 216 of /var/www/mysite/modules/field/field.info.inc).
Great module btw, but really hope this can be easily resolved..
Comment #7
Aciid commentedWell it says on the project statement, that some of the dev snapshots contain queries and functions that are "non-backwards-compatible".
Also the betas seem not to have been thoroughly tested, before releasing. So from now on , remember to backup your data and especially databases before upgrading.
If you are coming from B4->B5, remember to enable the File Entity module that should fix some error messages at least.
Comment #8
dcartman commentedThis seems to be the same problem as this one:
http://drupal.org/node/1210178#comment-4704284
Comment #9
lsolesen commented+1
Comment #10
kscott22 commentedSimilar issues here (see below). I backed up everything, but I'd prefer not to roll back if this can be fixed. Any ideas are MUCH appreciated.
Comment #11
thorn commentedI also got the errors. Will these be worked around quickly or should I rather focus on getting my site back to an earlier state?
A small suggestion for the Drupal Update process, could be a warning system that warns users about updating a module or theme, which is not backwards-compatible. It will spare a lot of developers trouble when setups is crashing.
/Thorn
Comment #12
Carlos Miranda Levy commentedBackup, backup, always backup before doing updates, in particular with modules in beta, dev, with warnings by developers, multiple dependencies and when going from one version to another.
I was able to restore to my previous state with the backup database and downloaded the old versions of the modules and will patiently wait ... this modules is mostly the almost right solution for a long-awaited functional, well integrated and flexible gallery module for Drupal (believe I've tried most of the gallery modules and recipes over the years and this one almost has it right ;-).
Comment #13
Tuscan commentedI have decided to remove the Media module and roll back for now until it is a bit more stable. Don't want to build a site, then later update the Media module to a newly released version to find its broke my site and I need to roll right back to 3 months ago before I installed it :-/
Is there any ETA yet on a stable release? Cause the module itself is great, just needs a lot of stability improvements.
Comment #14
anj commentedI didn't get these errors, but upgrading the database from beta4 to beta5 broke private downloads. The file download was skipped by file_file_download, but image_file_download no longer recognised the files as downloadable by image.module and passed the download back to file_file_download, which skipped the download again, leading to a "Page not found error".
Should I submit this as a separate bug?
Comment #15
Tuscan commentedWhen a new version of Media is released, we should wait until the other dependent modules like Media Gallery have caught up, and then update them all at the same time.
Otherwise you will find yourself with dependent modules that are not compatible with the latest Media module (which will cause all kinds of problems). If you check Media Gallery you will notice this was updated yesterday, I think this is now compatible with Media Beta 5.
Im still going to hold off now though until all the Media modules are a bit more stable. Don't suppose anyone knows when Beta 6 will be due for release? Or even better, 1.0?
Comment #16
aaron commented@anj: yes, please, report that as a different bug. there's already too much on this ticket, don't want that to get lost in the shuffle.
Comment #17
aaron commented@kscott22: I think that's also a different issue than the original report, if i read that correctly.
Comment #18
mesr01 commentedJust for the record, I rolled back the database following the issue and then waited for the new release of Media Gallery as Tuscan suggested. I could then update both modules at once and everything went smoothly this time.
Comment #19
aaron commented@kscott22: is there any chance you're using one or more of the following modules: mobile tools, rules, field collection, entity? and/or a module that implements hook_boot() or hook_module_implements_alter()? i'm tracking down an odd conflict that seems to indicate one or more of these causing problems. which may actually be a core bug; see #1224956: hook_module_implements_alter ignored in earlier phases of bootstrap.
Comment #20
kscott22 commented@aaron: I'm using both rules and entity. I just upgraded media browser plus and entity, and the errors have stopped.
Comment #21
robeano commentedThe PDOException relates to the recreation of an index on 'file_type' that basically moved from media module and into the file_entity module. You can ignore that issue.
The PHP Notices relate to the Styles module. At this time, it is recommended that you do not use the Styles module with media and media gallery modules.
There are no fixes for us to make for this upgrade path. Closing ticket.