Hello and thank you in advance for your support. I am running the latest version of drupal.

I have read the other PDO error messages posted here but they relate to the token table and I have set up my token table and that seems to be find. I do however get this error when I try to access the survey from drupal.
I setup my survey and attached the image. It shows I have all the right settings.

However when I click on the "to respond to the survey link" I get the first page just fine which asks for a title and gives me all the options but when I save I get this error below:

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 '.nid FROM node n JOIN node_revision node_revision ON n.nid = node_revision' at line 1: SELECT node_nid AS n.nid FROM {node} n JOIN {node_revision} node_revision ON n.nid = node_revision.nid AND n.vid = node_revision.vid JOIN {ls_answ} lsa ON lsa.nid = node_revision.nid AND lsa.vid = node_revision.vid WHERE n.type = :ntype AND ls_status = :ls_status AND ls_sync = :ls_sync AND ls_last_import < :ls_last_import ORDER BY ls_last_import ASC; Array ( [:ntype] => municipal_survey [:ls_status] => 3 [:ls_sync] => 1 [:ls_last_import] => 1374706407 ) in ls_answ_node_presave() (line 694 of /home/lethb029/public_html/sites/all/modules/limesurvey_sync/ls_answ/ls_answ.module).

Thank you for you help.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AvO WebWorks’s picture

Just to add that it does create a token in the table on Limesurvey database.
This is my first try so I may be totally missing something here.

thedut’s picture

Title: PDO error 42000 » fatal error if recycling answer is enabled
Assigned: Unassigned » thedut
Category: support » bug
Status: Active » Patch (to be ported)
FileSize
12.15 KB
801 bytes

Hello avostar,

Thank you for reporting this bug.
This bug only occurs if the survey option : 'Recycling virgin responses for the same user' is enabled (disabled by default).
In order to fix it : edit the ls_answ/ls_answ.module file on the line 690, replacing :
$recyclable_query = db_query("SELECT node_nid AS n.nid FROM {node} n
by
$recyclable_query = db_query("SELECT n.nid AS node_nid FROM {node} n
or use the provided patch or remplace the ls_answ.module file by the one attached.

I will include this fix into the next release.
6.x and 7.x branch are concerned.

AvO WebWorks’s picture

Thank you for your prompt support and fix.
I can confirm that the patch above fixed the issue for me.

thedut’s picture

Status: Patch (to be ported) » Closed (fixed)

Fix Included into the LimeSurvey Sync module 7.x.1.5 and the 6.x-1.5 versions.