I am unable to login as an admin and edit pages. I run into this error:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table '.image_dimensions' doesn't exist: SELECT * FROM {image_dimensions} id WHERE id.fid IN (:fids_0); Array ( [:fids_0] => 18 ) in file_entity_file_load() (line 169 of /sites/all/modules/file_entity/file_entity.file.inc

Can anyone help me?

Thanks!

Comments

damienmckenna’s picture

Status: Active » Postponed (maintainer needs more info)

Did you run the database updates? IIRC that table was recently added to file_entity.

sassafrass’s picture

I get a similar error:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.origname' in 'field list': SELECT base.fid AS fid, base.uid AS uid, base.filename AS filename, base.uri AS uri, base.filemime AS filemime, base.filesize AS filesize, base.status AS status, base.timestamp AS timestamp, base.origname AS origname, base.type AS type FROM {file_managed} base WHERE (base.fid IN (:db_condition_placeholder_0, :db_condition_placeholder_1)) ; Array ( [:db_condition_placeholder_0] => 69 [:db_condition_placeholder_1] => 70 ) in DrupalDefaultEntityController->load() (line 196 of /Library/WebServer/Documents/git/intranet-refresh/htdocs/includes/entity.inc).

When I try to run update.php, I get the following error:

Fatal error: Cannot access empty property in /htdocs/sites/all/modules/contrib/fe_paths/fe_paths.module on line 149

I had File Field Paths previously installed, disabled it and then uninstalled it. I am using File Entity 7.x-2.0-unstable7 and Media 7.x-2.0-unstable7.

adamtong’s picture

i have the same error too!

jcallanan’s picture

I also have this error

webatelier’s picture

Same problem here ...

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite_drupal4598.image_dimensions' doesn't exist: SELECT * FROM {image_dimensions} id WHERE id.fid IN (:fids_0); Array ( [:fids_0] => 75 ) in file_entity_file_load() (line 225 of /home/mysite/domains/mysite.be/public_html/dev/sites/all/modules/media/file_entity/file_entity.module).
The website encountered an unexpected error. Please try again later.
vliefooghe’s picture

Same for me, after the update to Media 7.1.4, that I did following PSA-2014-001.

Seems that something is broken in this update.
The file_entity_module has changed, and is the update.php did not triggered the update_7101. Therefore, the image_dimensions table is not created

In the system table, schema_version column for file_entity is set to 7215.

One solution is to set it to 7100, and re-run the update.php :

update system set schema_version = '7100' where  name = 'file_entity';

Seems there is a collision with Media 2, which uses File_entity 7.2.x

Edit: after analysis, the root cause was that I first installed file_entity, but then I installed Media 7.1, which brings its own File Entity stuff. I had to disable / desinstall File entity, and then re-enable Media.

webatelier’s picture

Rolling back to media 7.1.3 solved for me for now ...
Shouldn't this issue be posted in the media issues queue ?
Edit : it's allready there
https://drupal.org/node/2170231

introbay’s picture

Issue summary: View changes

#6 worked for me.

Thanks vliefooghe!!

anisaM’s picture

This happened to me after upgrade as well on my multisite setup. You need run update.php in order to create the missing tables. If you can't do it, change the settings.php from FALSE to TRUE in the short time. DO NOT FORGET TO CHANGE IT AGAIN.

mxt’s picture

@sassafrass in #2: I've experienced exactly the same (critical) situation: did you resolved it?

(I've opened an issue for that: #2210845: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.origname' in 'field list' after unistalling)

Thank you very much for any help

FOLLOW UP:
Ok, I've got it: both File (field) path and File Entity Path creates/uses the same additional field "origname" on "file_managed" table.

So, if you are in a situation where you have first installed File Field Paths and then disabled it in favour of File Entity Path, and then you want to completely uninstall File Field path, you have first to comment out filefield_paths_uninstall() function because this function deletes "origname" field in "file_managed" table (and FEP cannot works without it, triggering the error)

Hope this help

Wound’s picture

With the following SQL statement derived from the file_entity.install file, I was able to restore the table in my MySQL database. Be careful to prepend your database table prefix to the table name, if you use one.

CREATE TABLE `image_dimensions` (
  `fid` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'File ID.',
  `height` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'The height of the image in pixels.',
  `width` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'The width of the image in pixels.',
  PRIMARY KEY (`fid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='Cache images dimensions.';

Luckily this table just serves caching purposes, so it doesn't matter, if the table is empty at the beginning.

Maybe this is of help for one ore the other.

Cheers Wound

heilop’s picture

#6 works ok for me too.
After execute the schema update, just run update.php
Thanks @vliefooghe!

roundbox’s picture

#11 was a quick fix for me. Thank You!

paean99’s picture

#11 worked for me. Thanks.

digitalsweetspot’s picture

#11 worked for me as well. thanks for the tip!

imrancluster’s picture

#11 worked for me :)

I just now earned $4 from a client :P

DRUPALON’s picture

#11 works fine
Thank You!
:D

elvin - albania drupal developer’s picture

#11 worked for me too. For some reason my server crashed and many things were messed up

Thank You for the quick fix! This is why i love working with Drupal. The community ROCKS!!!

:D

stevep’s picture

#6 with #12 worked for me.
i.e.
1. update system set schema_version = '7100' where name = 'file_entity';
2. After execute the schema update, just run update.php

bdupls’s picture

#11 worked for me, thanks!

jennypanighetti’s picture

My entire site just got knocked offline because of this, and I have no idea how this table was removed. We did not update the module recently.

The SQL code in #11 fixed it for me, THANK YOU!

bdupls’s picture

Did #11 then ran update and got this error.
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'xxx.media_filter_usage' doesn't exist:
Intermittent problem, sometimes it works then just going to a page I have these errors; the Table 'xxx.yyy' module changes.
Running on Drupal commons 7.37 installation.

alfonsobarreiro’s picture

#11 worked for me. Thanks Wound!

Upbeat’s picture

Same problem for me but it ran the installation by simply using www.domainname.com/install.php

ericjenkins’s picture

#11 worked for me, too. Thank you!

icf-vpathak’s picture

#12 worked for me. Thanks!

ruby232’s picture

#11 worked for me, too. Thank you!

code4drupal’s picture

Thanks vliefooghe #6, it works for me.

leisurman’s picture

#11 worked for me.
But in my system table, my file_entity schema_version is '-1' is that correct?
I am using Media 7.x-1.5 with comes with File entity 7.x-1.5 bundled.

Devendra P’s picture

#11 really worked for me!!!

thanks!!

wdseelig’s picture

#11 Solved a different problem for me. Go here: https://www.drupal.org/node/2782215 to see the difficulties I was having with a site migration that this solution fixed.

Thanks very much, Wound.

tamnv’s picture

#11 Worked for me. We can use https://api.drupal.org/api/drupal/includes%21database%21database.inc/fun... to create "image_dimensions" table.

marty.true’s picture

#6 worked perfectly

wdseelig’s picture

#11 Worked for me as well. Thanks VERY MUCH.

Molson_Ice’s picture

#6 worked for me. I got the error message when I installed the Colorbox module.

jaesperanza’s picture

Yep, #6 worked perfectly!

mkapst’s picture

#11 worked for me thanks

code4drupal’s picture

mano2003’s picture

#11 worked for me, thanks!

josecarlos1977’s picture

Although 6 years have passed, # 11 has worked for me. Thanks a lot!