PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) LIMIT 1 OFFSET 0' at line 1: SELECT f.uri AS uri FROM {file_managed} f WHERE (f.fid IN (:db_condition_placeholder_0, :db_condition_placeholder_1, :db_condition_placeholder_2, :db_condition_placeholder_3, :db_condition_placeholder_4, :db_condition_placeholder_5, :db_condition_placeholder_6, :db_condition_placeholder_7, :db_condition_placeholder_8, :db_condition_placeholder_9, :db_condition_placeholder_10, :db_condition_placeholder_11, )) LIMIT 1 OFFSET 0; Array ( [:db_condition_placeholder_0] => 39 [:db_condition_placeholder_1] => 1 [:db_condition_placeholder_2] => [:db_condition_placeholder_3] => 1 [:db_condition_placeholder_4] => iI9vHMudU08 [:db_condition_placeholder_5] => youtube://v/iI9vHMudU08 [:db_condition_placeholder_6] => video/youtube [:db_condition_placeholder_7] => 0 [:db_condition_placeholder_8] => 1 [:db_condition_placeholder_9] => 1326179164 [:db_condition_placeholder_10] => video [:db_condition_placeholder_11] => 96bd41e5-f667-d1c4-4515-e9a22d477592 ) in emfield_widget_value() (line 107 of sites/all/modules/emfield/emfield.module).

Steps to duplicate:

- Set up a content type with embedded media fields
- Add video (I tried both the media:vimeo and media:youtube types.)
- Attempt to edit the node

I am thinking that this issue is with media.module, despite the error message referencing emfield.module, due to the fact that the emfield.module has not updated since October, and this is a recent regression, occuring just over the last few days (which did have an update to Media.)

Files: 
CommentFileSizeAuthor
#3 emfield-PDOException4200-1399458-3.patch517 bytestedavis

Comments

Priority:Normal» Major

Its still highly probable that the problem is with Emfield. The 2.x branch of Media has undergone a lot of changes, incl. API and spinning off the File Entity submodule to its own module, compared to the 1.x branch.

Many add-on modules for media does only work with the 1.x branch, often it is required to have two separate branches of them too.

Any chance you can test this with the Media 1.x branch and see if it breaks there too?

Bumping to major in any case.

Project:Media» Embedded Media Field
Version:7.x-2.x-dev» 7.x-1.x-dev
Component:Media field» Code

No, this is definitely still a bug due to emfield.

StatusFileSize
new517 bytes

Found this error today, looks like the emfield_widget_value is using an entire array from $fid to display the value rather than just using the actual fid.

The attached patch should fix the issue.

Status:Active» Needs review

Status:Needs review» Reviewed & tested by the community

I can confirm that this patch works on my install.

(Thanks, tedavis. :) )

I can also confirm that this patch works for me as well. I still couldn't edit a piece of content with a video link in it, even after I installed the patch. I had to remove the offending content and recreate it. Thanks for wicked sweet module, keep it up!

works for me

Works for me as well.

Work for me too. Nice catch.

Status:Reviewed & tested by the community» Fixed

Status:Fixed» Reviewed & tested by the community

I don't think this should be set to fixed until the patch has been committed. Will make it much harder for the maintainers to find as well.

Ditto, this patch does clear the error message described in the original post. After applying this one from #3 I can populate the embedded media field, save it and return to edit the node without errors.

OK, now I've got more details. Tell me if this is an issue for another queue, but this looks like behavior new after the patch.

I am seeing that submitting the node with a correct URL from Vimeo or Blip and then returning to the node edit form the field shows a value different and incorrect than I entered. The new links are often not working. Here is a set from Vimeo and Blip, the top URL is what I have entered and the bottom is the value seen on the edit form:

http://vimeo.com/37548094
http://vimeo.com/?v=37548094

Attempting to save the node with the second changed value returns this error; "Video Embed: Found no valid media with that url."

http://www.blip.tv/file/292924/
http://blip.tv/?v=AZKVNQI

Attempting to save the node with the second changed value returns about a hundred sets of these errors:

Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: document.write("<a href="http://blip.tv/?skin=iphone" class="LastLink"> in media_blip_get_rss() (line 176 of /Users/sean/dev/icateens_d7/sites/all/modules/media_bliptv/media_bliptv.module).
Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in media_blip_get_rss() (line 176 of /Users/sean/dev/icateens_d7/sites/all/modules/media_bliptv/media_bliptv.module).
Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 1081: parser error : Couldn't find end of Start Tag a line 1081 in media_blip_get_rss() (line 176 of /Users/sean/dev/icateens_d7/sites/all/modules/media_bliptv/media_bliptv.module).

Using a Youtube link actually works correctly. It changes this URL to the one listed below it:

http://youtu.be/Urx21kpsB40
http://youtube.com/watch?v=Urx21kpsB40

Ok, I guess I'll leave this issue RTBC and break out the failures I see into their respective provider modules. The patch does clear that error like the original issue addressed.

Blip path problem: http://drupal.org/node/1469930
Vimeo path problem: http://drupal.org/node/1469934

The provided patch fixed the issue for me as well. Thanks!

Thanks for the patch. I've just encountered this bug. I was affraid of not being able to translate video nodes :)

works for me! :)

Works for me. Thanks!

Works here too.

Patch worked for me.
Oddly I had one site where the edit attempt threw the error as described above, and another where the editor appeared OK but a completely wrong path was shown for the video (the path was in fact pointed at one of my theme's css files).

Patch worked for me. Thanks @tedavis!

has the patch been committed to a release?

I want to know this too, I still can't edit my video node without getting the above error. I also don't know how to apply the patch so a new release would be helpful.

Sam.

@samwillc:

http://drupal.org/patch/apply

Note that this requires shell access.

Thanks, but I don't have shell access.

http://drupal.org/project/video_embed_field

This module works a charm with no issues and seeing as I will only be using youtube, a good solution for me. I will come back to this module at a later date on a test site as it seems to have huge potential and be very versatile.

Sam.

Patch works great!

Works for me.

The patch at #3 worked for me. Thanks, tedavis!!

Guys, this patch works for me too. Please, commit it!

Status:Reviewed & tested by the community» Fixed

Status:Fixed» Closed (fixed)

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