Closed (cannot reproduce)
Project:
D7 Media
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Jan 2014 at 14:24 UTC
Updated:
25 Jan 2016 at 14:31 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dave reidDid you update the File entity module too? Which version are you using?
Comment #2
museumboy commentedI'm getting same exact error. I've asked my system admins if they updated anything.
Comment #3
emettler commentedSame bug - had to roll back to 7.x-1.3.
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pantheon.image_dimensions' doesn't exist: SELECT * FROM {image_dimensions} id WHERE id.fid IN (:fids_0); Array ( [:fids_0] => 1256 ) in file_entity_file_load() (line 225 of /srv/bindings/e256e388c1704267b32ddd319c4e8106/code/sites/all/modules/media/file_entity/file_entity.module).Comment #4
emettler commentedAnd yes - I updated the File Entity module too - tried rolling that back - error was still there. Rolled back Media and that fixed. Entity is back to the latest version with no issues.
Comment #5
dave reidIf you are using Media 7.x-1.x, I'll repeat what both project pages say, you *cannot* use the separate File entity project and must use the File entity module that is contained inside the Media project. Only if you are using Media 7.x-2.x should you download and install the separate File entity module.
Comment #6
wellyrm commentedI solved the problem on my site.
Just do what Dave Reid says >> If you are using Media 7.x-1.x, use File entity that included in module.
When this problem appear, my site using file_entity from separate module and this problem occur. Then I uninstall media and file_entity module also remove the file_entity from modules folder and re-install media module. And then my site normal again.
Don't forget backup your site first.
Comment #7
pete-b commentedThe above wasn't working for me, probably because I previously had media 2.x and uninstalled it (and the standalone file_entity module) though something was still lingering preventing the schema update.
Calling the schema update manually worked for me in this case:
Comment #8
stefnes commentedsame bug but with previously updated entity API 1.2 to 1.3 .
I 've no File_entity module separated from Media in my site... why I keep the same bug ?
Comment #9
cutmedia commentedsame issue, rolling back to media 1.3 fixes it
Comment #10
paul.berlin commentedI have the same error as MaxF and museumboy.
The solution of wellyrm (uninstall module media) I can not use because it is not possible. I would loose my media galleries.
I tried the solution of pete-b but I get the error:
Fatal error: Call to undefined function module_load_include() in sites/default/settings.php on line 459
Any help?
Comment #11
pete-b commented@paul.berlin sounds like drupal is not fully bootstraped when you run the script, this article might help you:
http://www.oliverdavies.co.uk/blog/2013/11/dont-bootstrap-drupal-use-drush
Comment #12
paul.berlin commented@pete-b thanks.
No the new version of media works fine.
Comment #13
webatelier commentedSame issue here with prior update of Entity API to 1.3
No separate file entity module installed ...
Had to roll back to Media 1.3 to fix this
Tried twice to upgrade to media 1.4 with same issue every time ...
Comment #14
sbgranny commentedSame issue as #13. Had to roll back to Media 1.3
Comment #15
Eric Tiggemann commentedFor me it worked to just replace the folder file_entity in the media module with its 1.3 version by leaving the rest of the media folder content on 1.4.
I will be somewhat more cautious with the coming upgrade for the Media module then anyhow I am.
Comment #16
beulette commentedI think I've found the solution for some of you
I had the same problem, and I used a 2.x version of Media in the past too.
In the database, in the table named 'system', the line with column 'name' value was 'file_entity' had its "schema_version" column value at 7104.
this is in the database where informations about modules versions are stored
The .install file was containing the 'file_entity_update_7101' fonction to create the table needed, {image_dimensions}.
So, one of these informations were false : when the update script is launched, it will search for a 'field_entity_update_####' function with version number higher thant 7104. So it won't launch the function with 7101 version number.
I think the "7104" value was created by the old Media 2.x version I used 1 or 2 years before.
So I solved the problem by changing the database value "schema_version" from "7104" to "7100", so that the update function will be considered. Then I launched the update.php, and the table was created.
Other solutionwould be to change the function name in file_entity.install, from "file_entity_update_7101" to "file_entity_update_7105". But not a good idea : you may have to do the same with every new version. Only use it if you can't access to your database.Comment #17
webatelier commentedyes !
seems #16 solved it for me too
although i had an other value than 7104 (think it was 7125 or 7225)
also had media2 installed previously, so ... this it probably was caused it
thx Beulette !
Comment #18
dalehgeist commentedSo...where can you find Media 1.3? Right here: https://drupal.org/node/1931764
Comment #19
Ivan_Dagreat commented#16 Worked for me. But my `schema_version` was "-1". So I still set it to "7100" then ran (drush updb) and the table was created.
Also, When I went back to Media-7.x-1.3 (drush dl media-7.x-1.3) it worked but I wanted to use the newer version of Media.
Thanks for all the comments.
Comment #20
siramsay commented#16 worked for me too, exactly same error as started this thread, thanks
my schema version was 7212
i manaully run
UPDATE `MY_DATABASE_NAME`.`system` SET `schema_version` = '7100' WHERE `system`.`filename` = 'sites/all/modules/media/file_entity/file_entity.module';thanks
Comment #21
creeksideplayers commentedThanks, size, #20 worked for me. I think I loaded file_entity 2.x at one time but later uninstalled it. I wonder why that database entry wasn't removed when I did the uninstall.
Comment #22
akeimou commentedhaven't tried 2.x so #15 worked for me
Comment #23
jsiesquen commentedI'm restore Media 7.x-1.3 module, replace the folder only and now work!
The #15 work for me!
Comment #24
labboy0276 commentedI can confirm #20 worked for me also. This client must have had the standalone file_entity with their media 1.x branch at some point. Thanks.
Comment #25
GerardoD commentedMy system table, under the name column did not have file_entity
Comment #26
GerardoD commentedsolution #15 worked for me.
Comment #27
bkno commentedUpdate query in #20 fixed it for me on a complex site I inherited. Thanks!
Comment #28
drupalninja99 commentedWe need a patch that just fixes the update number to file_entity_update_7105 (or some other number)
Comment #29
anybody#16 worked for me to. A safe solution is required!
Comment #30
damienmckennaHere's a patch that will actually resolve the problem.
Comment #31
cameron prince commented#30 works well.
Comment #32
greg boggs#30 did not work for me.
There are still no pending database updates after applying the patch.
Comment #33
haklo commentedI was using "File Entity 7.x-2-alpha3" and "Media 7.x-1.4", which have the big issue.
Then I roll back "Media 7.x-1.3" and removed "File Entity 7.x-2-alpha3", which solve the problem for uploading files.
And then, I path #30(media-n2170231-30.patch) after upgrading from "Media 7.x-1.3" to "Media 7.x-1.4", which created the same error again.
Comment #34
Carlos Miranda Levy commentedPatch on #30 works fine.
From your Drupal root, follow this on Linux shell...
Download the new media module (drush up will crash, so download it manually).
then download and apply the patch...
then run update.php from the browser or
Comment #35
anthonylindsay commentedTrying to upgrade from 1.2 to 1.4 I got the image_dimension table errors. I solved it by instead of using drush up as I might normally do, I:
and hey presto, it worked flawlessly.
In my case, it appears that drush up was at fault, rather than media module.
Comment #36
haklo commented@Carlos Miranda Levy #34. Did you installed "File Entity" 7.x-2.0-alpha3 before? If not, then that's different. This Patch would not work for anyone who has installed "File Entity" 7.x-2.0-alpha3, even after we removed.
Comment #37
adshill commentedJust to mention that #16 worked for me :)
Comment #38
Xagarsan commentedSolution #13 was correct for me. Install Media 7.x-1.3 and the error disappeared
Comment #39
joneldesouza commentedPatch on #30 works fine.
Comment #40
megabox commentedEl parch del #30 funciono perfecto siguiendo las indicaciones del #34 Gracias! (thanks!)
Comment #41
ben.kyriakou commentedI've experienced this error, and rolled a patch that will allow you to run the update. This isn't particularly extensively tested, so I'd suggest running the update then reverting to vanilla 7.x-1.4.
After some debugging I found that
file_entity_file_load()was being called fromrevisioning_node_load(), but may equally be called any time a node is loaded resulting inhook_file_load()being called. This prevented me from running update.php (or drush updb), sincedrupal_path_initialize()loaded my homepage (which is a node) in the background when visiting update.php.Although this isn't specifically a Media bug, it's fairly likely you'll have this issue if you use nodes and/or have one as your homepage. It would be nice if not having this database didn't cause a fatal error when
hook_file_load()is called.Comment #42
mikelaroy commented#15 worked for me. Thanks dalehgeist for giving us a link to that version.
Comment #43
jordan8037310 commented#16 worked for me, thanks!
Comment #44
frederico commented#16 also worked for me. Thanks to Beulette !!!
Comment #45
steinmb commentedRead through the issue and it is hard to understand how to reproduce this or if there is anything to test. To me seem this issue to be mostly people mixing up 7.x-1.x and 7.x-2.x of media and file_entity and no real bug in hook_update_N() to file_entity. The classical thing would be people that do:
To get fieldable files in drupal. After using that for a while then decide that they also need the media module:
This will not work. file_entity-7.x-2 need media-7.x-2
I find nothing to commit and no bugs here. Suggest we close this issue and move on.
Comment #46
zanndoth commentedI have the same error and both Media and File Entity are using 1.4. Here's the strange thing. I'm using a single drupal setup to host multiple domain names using different tables. It works fine on the main website but I have this error on all the other domains.
Edit: It's not funny how the answers always occurs to me after I post a problem. Manage to solve my issues by updating all the database individually.
Comment #47
steinmb commentedClosing issue. See #45 for more info.
Comment #48
r2coder commentedThanks all. Following the steps for #16 works. I'll test the patch on another server - just needed a quick fix for this.
Comment #49
elkz commented#16 worked ! thanks !!
Comment #50
todd zebert commented#16 worked for me
Comment #51
francoisleralle commentedI got the same problem and manage to solve it by first upgrading from 7.x-1.3 to 7.x-1.4 and then from 7.x-1.4 to 7.x-1.5 using drush pm-update
Comment #52
Jonathan Lauer commented#16 worked for me !!! thanks :) 1 hour loose to find that
Comment #53
msaddamalam commentedHi!
i'm facing a problem while clicking on a menu link with this error.
databasename.image_dimension table not exit.
i understand this problem but can't resolve it.
kindly help me i need to submit my project urgently.
any one know image dimenstion tablea fields and datatypes of it.
so that i create this table manually.
Comment #54
brightboldPatch in #30, followed by rerunning update.php, solved the problem for me.
Contrary to what's claimed in #45, I do not believe the site where I'm having this problem ever had any version of Media or File Entity 2.x installed. I encountered this problem when I upgraded to Media 1.4.
Comment #55
GAtherton commented#16 solved this for me.
I was using Media 1.5
My schema version was set to 7216 in systems table. Edited to 7100, ran updates. Update reported that image_dimensions table needed to be constructed. On continuing table was constructed, error now gone.
In .install function media_update_7216 was explicitly disabled. After update there is no such function.
I don't remember using Media 2 - this fault appeared recently and media has been installed for well over a year, updated in May 2015.
I had noticed image upload via the media button on ckeditor was broken some time ago and now it is working so perhaps that indicates that the problem was long standing, but a recent update somewhere revealed the recent error (only reported when I tried to access the admin/content, everything else was working)?
Thanks to Beulette for this fix
Comment #56
mariaioann commented#16 and #19 worked for me too.
Comment #57
IrishAdo commentedI couldn't get #16 to work for me as the value in the database was 7126 at this time so I built the table manually FYI I didn't add the foreign key
CREATE TABLE `eque2`.`image_dimensions` (
`fid` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`height` INT UNSIGNED NOT NULL DEFAULT 0,
`width` INT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`fid`),
UNIQUE INDEX `fid_UNIQUE` (`fid` ASC));