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
Comment | File | Size | Author |
---|---|---|---|
#10 | webform_nosave_empty.patch | 1.38 KB | quicksketch |
#9 | webform_update_empty_value.patch | 910 bytes | quicksketch |
#1 | adding-condition-1394494.patch | 880 bytes | DuaelFr |
Comments
Comment #1
DuaelFrThis small fix do not seem to have side effects.
Comment #2
quicksketchAre 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.
Comment #3
DuaelFrYes 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.
Comment #4
STB100 CreditAttribution: STB100 commentedI'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).
Comment #5
jorgbert CreditAttribution: jorgbert commentedI'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).
Comment #6
DuaelFrDid you try my patch ?
It works for me
Comment #7
jorgbert CreditAttribution: jorgbert commentedI'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!
Comment #8
SWMdave CreditAttribution: SWMdave commented_
Comment #9
quicksketchI 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.
Comment #10
quicksketchI 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.
Comment #11
DuaelFrThank you Nathan !