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.

Comments

danchadwick’s picture

Status: Active » Postponed (maintainer needs more info)

One 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.

  • DanChadwick committed 822c573 on 7.x-4.x
    Issue #2426763 by DanChadwick: PDOException on analysis of option-less...
  • DanChadwick committed a7a714d on 8.x-4.x
    Issue #2426763 by DanChadwick: PDOException on analysis of option-less...
danchadwick’s picture

Version: 7.x-4.2 » 8.x-4.x-dev
Status: Postponed (maintainer needs more info) » Fixed
StatusFileSize
new4.88 KB

This 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

Status: Fixed » Closed (fixed)

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

danchadwick’s picture

Version: 8.x-4.x-dev » 7.x-4.x-dev