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.)
Comment | File | Size | Author |
---|---|---|---|
#3 | emfield-PDOException4200-1399458-3.patch | 517 bytes | tedavis |
Comments
Comment #1
tsvenson CreditAttribution: tsvenson commentedIts 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.
Comment #2
Dave ReidNo, this is definitely still a bug due to emfield.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedFound 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.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #5
meridiandigital CreditAttribution: meridiandigital commentedI can confirm that this patch works on my install.
(Thanks, tedavis. :) )
Comment #6
alexandersluiter CreditAttribution: alexandersluiter commentedI 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!
Comment #7
KoCo CreditAttribution: KoCo commentedworks for me
Comment #8
Yoran Scholiers CreditAttribution: Yoran Scholiers commentedWorks for me as well.
Comment #9
asdLArs CreditAttribution: asdLArs commentedWork for me too. Nice catch.
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #11
tsvenson CreditAttribution: tsvenson commentedI 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.
Comment #12
seaneffel CreditAttribution: seaneffel commentedDitto, 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.
Comment #13
seaneffel CreditAttribution: seaneffel commentedOK, 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:
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
Comment #14
seaneffel CreditAttribution: seaneffel commentedOk, 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
Comment #15
cfbauer CreditAttribution: cfbauer commentedThe provided patch fixed the issue for me as well. Thanks!
Comment #16
heretic381 CreditAttribution: heretic381 commentedThanks for the patch. I've just encountered this bug. I was affraid of not being able to translate video nodes :)
Comment #17
puppyman CreditAttribution: puppyman commentedworks for me! :)
Comment #18
ieyara CreditAttribution: ieyara commentedWorks for me. Thanks!
Comment #19
davidneedhamWorks here too.
Comment #20
Sam MoorePatch 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).
Comment #21
silverbell CreditAttribution: silverbell commentedPatch worked for me. Thanks @tedavis!
Comment #22
chaloum CreditAttribution: chaloum commentedhas the patch been committed to a release?
Comment #23
samwillc CreditAttribution: samwillc commentedI 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.
Comment #24
meridiandigital CreditAttribution: meridiandigital commented@samwillc:
http://drupal.org/patch/apply
Note that this requires shell access.
Comment #25
samwillc CreditAttribution: samwillc commentedThanks, 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.
Comment #26
vensires CreditAttribution: vensires commentedPatch works great!
Comment #27
Maxime Gilbert CreditAttribution: Maxime Gilbert commentedWorks for me.
Comment #28
sunshinee CreditAttribution: sunshinee commentedThe patch at #3 worked for me. Thanks, tedavis!!
Comment #29
andyceo CreditAttribution: andyceo commentedGuys, this patch works for me too. Please, commit it!
Comment #30
aaron CreditAttribution: aaron commentedhttp://drupalcode.org/project/emfield.git/commit/48d2dda
thanks!