Hi,

Steps to reproduce :
1- Only create a markup field before the first page break
2- Make a page break then continue your form
3- Go to your form, walk through the first step

Here is the error message :
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 '))' at line 1: DELETE FROM {webform_submitted_data} WHERE (sid = :db_condition_placeholder_0) AND (cid IN ()) ; Array ( [:db_condition_placeholder_0] => 1 ) dans webform_submission_update() (line 75 in D:\wamp\www\pechbleu\sites\all\modules\webform\includes\webform.submissions.inc).

Regards

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DuaelFr’s picture

Status: Active » Needs review
FileSize
880 bytes

This small fix do not seem to have side effects.

quicksketch’s picture

Are you sure you're running the latest version of Webform? This was already fixed in the 3.15 version by this issue: #1291918: Incorrect integer value: '' for column 'cid' when saving markup only page draft first.

DuaelFr’s picture

Yes I am using 3.15 and tried 3.x-dev too

The quoted issue seems to concern data insertion while my patch fix an issue when submission data is deleted before update.

STB100’s picture

I'm getting this problem too.

webform 7.x-3.15

This was a fresh install and not a D6 upgrade. I suspect it is something to do with webform validation as the changes (to config) that I made prior to the error were either text / typos in my webform, default to Shown / Hidden sections or references to content in a Validated section.


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 '))' at line 1: DELETE FROM {webform_submitted_data} WHERE (sid = :db_condition_placeholder_0) AND (cid IN ()) ; Array ( [:db_condition_placeholder_0] => 20 ) in webform_submission_update() (line 75 of /home/cubadmin/public_html/sites/all/modules/webform/includes/webform.submissions.inc).

jorgbert’s picture

I'm getting the exact same error ...

I also am using 3.15

Exact same steps to reproduce:
1- Only create a markup field before the first page break
2- Make a page break then continue your form
3- Go to your form, walk through the first step

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 '))' at line 1: DELETE FROM {webform_submitted_data} WHERE (sid = :db_condition_placeholder_0) AND (cid IN ()) ; Array ( [:db_condition_placeholder_0] => 11 ) in webform_submission_update() (line 75 of E:\websites\10.1.3.4 - www.dev.mysite.com.employee2\htdocs-dev\sites\all\modules\contrib\webform\includes\webform.submissions.inc).

DuaelFr’s picture

Did you try my patch ?
It works for me

jorgbert’s picture

I'll pass that on to our PHP programmer, who is currently working on this case. He added additional imput fields on the first page, and then the form worked -- for userIDs that were not already in the Webform results table. He just cleared out the webform submission results, and now my login works fine (with the additional fields on the first page of the multi-page webform.

I just sent him your info and patch. Thanks!

SWMdave’s picture

_

quicksketch’s picture

Title: PDOException whith auto save between pages » PDOException with auto save between pages if the first page is empty
Priority: Major » Normal
Status: Needs review » Fixed
FileSize
910 bytes

I couldn't actually get this problem to reproduce for me, but I can see how it's possible to still get the error. Based on @DuaelFr's patch, I've committed the attached patch which accomplishes the same thing. I just did some reformatting to match the D6 approach, which seems to have already thought of this problem.

quicksketch’s picture

FileSize
1.38 KB

I found another similar error caused by saving submissions with no data in them. Because Webform will save just the row into the "webform_submissions" table but nothing into the "webform_submitted_data" table, the submission ends up not loading back out of the database properly. Since there's no point in saving a completely blank submission anyway, this additional patch prevents forms from saving an empty submission (such as on a form with no fields on the first page and automatic save as draft enabled). I've committed this patch to help prevent the originally reported issue also.

DuaelFr’s picture

Thank you Nathan !

Status: Fixed » Closed (fixed)

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