Using the latest version of emfield.
I'm unable to edit nodes which have a populated file_field with the Embedded media field widget.
So adding a video makes editing the node impossible.

The error below:

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'fm.status' in 'where clause': SELECT f.uri AS uri FROM {file_managed} f WHERE (f.fid = :db_condition_placeholder_0) AND (fm.status = :db_condition_placeholder_1) AND (fm.uri NOT LIKE :db_condition_placeholder_2 ESCAPE '\\') LIMIT 1 OFFSET 0; Array ( [:db_condition_placeholder_0] => 25 [:db_condition_placeholder_1] => 1 [:db_condition_placeholder_2] => temporary% ) in emfield_widget_value() (line 107 of X/sites/all/modules/emfield/emfield.module).

CommentFileSizeAuthor
#1 fix_node_edit_widget_query-1969094-2.patch692 bytesdmsmidt
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dmsmidt’s picture

And a patch which fixes the error.

Don't ask me why exactly, I don't know why the query tries to use the "fm" base table alias, while "f" is chosen.
I guess it has something to do with the File Entity module, which uses "fm" as an alias. And hooks into the process to translate the path in human readable form.

loze’s picture

This patch fixed this issue for me. Thanks.

jackalope’s picture

The patch in #1 worked for me as well. Thanks so much!

therealjimryan’s picture

Hey Guys,
How do I go about installing this patch?
^NM
I figured it out.
Top lines tell you which file
@@ Says Line Number
-- & ++ are the lines you should remove and add (respectively)
Surprisingly very easy.

And yes, this patch did fix my issue. Thank you!

drupalgin’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Patch in #1 worked for me.