Hello,
On one webforms used in a production site I came across a PDOException when accessing a webform-results/analysis
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 ')) GROUP BY data' at line 1: SELECT wsd.data AS data, COUNT(data) AS datacount FROM {webform_submitted_data} wsd WHERE (nid = :db_condition_placeholder_0) AND (cid = :db_condition_placeholder_1) AND (data <> :db_condition_placeholder_2) AND (data IN ()) GROUP BY data; Array ( [:db_condition_placeholder_0] => 27325 [:db_condition_placeholder_1] => 39 [:db_condition_placeholder_2] => ) in _webform_analysis_select() (line 671 of /home/SITENAME/public_html/sites/all/modules/contrib/webform/components/select.inc).
Also I noticed that I cannot see the menu to access the setting of webforms to edit the form fields or link with CiviCRM events or contacts. I have to add to the URL either /webform or /civicrm when I need edit the form fields…
Thank you for help.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | webform-pdoexception_optionless_select-2426763-2.patch | 4.88 KB | danchadwick |
Comments
Comment #1
danchadwick commentedOne issue per issue queue entry, please. Your issue with civicrm is unrelated. We don't test integration with other modules, so if you have some compatibility with civicrm, I suggest you debug it yourself or try the civicrm issue queue. If you do in fact find a bug within webform, please open a new issue.
For the first issue, we need to know the data involved. webform is trying to perform analysis on data that is not present in some situation. Do need to reduce this to a simple set of instructions that can reproduce the issue.
Comment #3
danchadwick commentedThis appears when a select component has no options defined. This can only happen when an option list is dynamically generated, and is empty. The analysis is then displayed. If the select-or-other modules is enabled and the other option is enabled for the component, then a second PDO exception happens when trying to retrieve the other values.
Committed to 7.x-4.x and 8.x
Comment #5
danchadwick commented