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 ')) AND (cid = '1') ORDER BY nid ASC' at line 2: SELECT webform_component.* FROM {webform_component} webform_component WHERE (nid IN ()) AND (cid = :db_condition_placeholder_0) ORDER BY nid ASC; Array ( [:db_condition_placeholder_0] => 1 ) en webform_localization_component_get_translations() (línea 44 de webform_localization/includes/webform_localization.component.sync.inc).

Will post a patch asap.

Marked as "major" because it is not possible to update a webform node configured for content translation/sync, but does not have a translated node yet. It's just rthe first node in a translation set, and fails.

Comments

markus_petrux’s picture

Title: PDOException when updating a webform node that do not have translations yet » PDOException when updating a webform node that does not have translations yet
markus_petrux’s picture

BTW, before that error, a PHP warning is also generated:

Warning: Invalid argument supplied for foreach() en webform_localization_component_get_translations()

The patch will fix this as well. Reported here for easy reference.

markus_petrux’s picture

Status: Active » Needs review
StatusFileSize
new2.09 KB

Status: Needs review » Needs work

The last submitted patch, 3: webform_localization-2396007-3.patch, failed testing.

joseph.olstad’s picture

Status: Needs work » Needs review

run test

joseph.olstad’s picture

StatusFileSize
new2.09 KB

simpletest needs a new file to process, same patch, different filename.

joseph.olstad’s picture

joseph.olstad’s picture

is this still an issue for people out there? I haven't yet taken the time to properly test this and reproduce the issue.

joseph.olstad’s picture

StatusFileSize
new2.09 KB
joseph.olstad’s picture

Can someone please confirm if this is still an issue? I know the patch is passing, but no one has commented any feedback about this saying if this is helping them or not.

joseph.olstad’s picture

Status: Needs review » Closed (duplicate)

No one has commented on this issue in over a month, therefore it is probably safe to say that this is a duplicate of "#2397109: Invalid argument supplied for foreach() in webform_localization.module line 195 when no translations available"

kyberman’s picture

Status: Closed (duplicate) » Needs review

I don't think this is a duplicate of #2397109 because that issue solves only deleting and it didn't help with this issue. I still have the same problems with 7.x-4.2 and 7.x-4.x-dev for the same conditions as it was reported by markus_petrux. The #11 patch helped a lot, thanks!

joseph.olstad’s picture

Status: Needs review » Fixed

Thanks to markus_petrux for his great work on the initial patch and also to kyberman for confirming fix.

  • joseph.olstad committed 495c2c8 on 7.x-4.x
    Issue #2396007 by joseph.olstad, markus_petrux, kyberman: PDOException...

Status: Fixed » Closed (fixed)

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