I am getting this error when trying to save a node with a Multimedia asset with the Media file selector. If I remove the asset and save it works.

This started to happen when I upgraded to the stable version of media.

PHP Fatal error: Call to undefined function file_entity_file_is_local() in media.fields.inc on line 333, referer: /node/1171/edit

Comments

Dave Reid’s picture

Status: Active » Postponed (maintainer needs more info)

Hrm, that function is definitely defined in http://drupalcode.org/project/media.git/blob/acc0c9712e893dbd1c031c764e2... which was included with the 1.0 release of the module. I would double check that the file_entity module is enabled and exists under the media module folder.

hoZt’s picture

Status: Postponed (maintainer needs more info) » Fixed

Thanks for your quick response and helping me find the problem. It turns out that the file_entity module was installed and it was conflicting with media module. I removed it and all is working.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

sdmaxey’s picture

I'm getting this error and not following the exchange above.

Installed are Media 7.x-1.0 and File Entity 7.x-2.0-unstable3 (which is listed as required by Media--so I'm not sure how the person above could have removed it to make his site work).

What I experience:
I try to add a video to an existing page with the edit screen in overlay and hit save. I am taken to the edit page, not in overlay, with the video asset not added. I try to add it again and hit save. I get the error Call to undefined function file_entity_file_is_local() in media.fields.inc on line 333

Am I supposed to forcibly uninstall the free-standing File Entity module (is there one included with "under" the Media module)? Is the separate module no longer a requirement of Media?

tsvenson’s picture

@sdmaxey: In the 1.x branch, the File Entity module is included in the Media module. One of the big changes in 2.x was to spin it off to its own module.

So, for 1.x you should not install the stand alone File Entity module as it is not designed to work with it.

killtheliterate’s picture

Seeing this error also

File Entity: 7.x-2.0-unstable3
Media Module: 7.x-2.0-unstable3+47-dev

This occurs when saving a node that has already had a piece of media attached to it. Haven't hit it until that, as my media is associated via a hook_node_insert().

Dave Reid’s picture

If you update to Media-7.x-2.x-dev, then you also need to update File entity to the latest 7.x-2.x-dev.

Helge’s picture

I`ve downloaded the new stuff

File Entity: 7.x-2.0-unstable3
Media Module: 7.x-2.0-unstable3+47-dev

and copied it via ftp into the old folders.
Cleaned the cache, tried to upload some images or mpgs.
Same prob as before.

Dave Reid’s picture

You need to download http://drupal.org/node/1303450 not 7.x-2.0-unstable3. Not sure how I could be more clear on that.

Helge’s picture

hmm, copied the
- Media 7.x-2.x-dev
- File entity 7.x-2.x-dev
into the "sites/all/modules" Filesystem.

now i get a Error:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal7.image_dimensions' doesn't exist: SELECT * FROM {image_dimensions} id WHERE id.fid IN (:fids_0, :fids_1, :fids_2, :fids_3, ... in file_entity_file_load() (line 127 of /var/www/web755/html/mediaemotion/drupal7/sites/all/modules/file_entity/file_entity.file.inc).

What went wrong?

Can`t disable the modules, the are grayed out.

Helge’s picture

Tried to update again, now the file_entity module is in the sites/all/modules folder.
Is it the right position?
Or schould it be in the mediafolder?

new error message:

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

Dave Reid’s picture

Because file_entity is its own module, it should be located in sites/all/modules/file_entity. You should not have a directory sites/all/modules/media/file_entity, and if it exists, it should be deleted.

You also need to run update.php every time a module is updated.

tsvenson’s picture

@Dave Reid: Worth mentioning that for Media 1.x (for which this issue is for) File Entity is a submodule included with the Media module and thus there should be a media/file_entity module.

In @Helge's case though he is on 2.x and thus the File Entity is its own separate module.

2dareis2do’s picture

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

I am getting this problem - stopping me from using version 2.x of the Media module

Dave Reid’s picture

You also need to run update.php every time a module is updated.

Nikdhil Mdohfan’s picture

file_entity is currently built in with media module.
No ned to install it as a standalone module.
If you have one ? Remove it this will work.