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.
Comment | File | Size | Author |
---|---|---|---|
#2 | fatal_error_if_recycling_answer_enabled-2050809-2.patch | 801 bytes | thedut |
#2 | ls_answ.module.zip | 12.15 KB | thedut |
survey.jpg | 74.5 KB | AvO WebWorks |
Comments
Comment #1
AvO WebWorks CreditAttribution: AvO WebWorks commentedJust 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.
Comment #2
thedut CreditAttribution: thedut commentedHello 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.
Comment #3
AvO WebWorks CreditAttribution: AvO WebWorks commentedThank you for your prompt support and fix.
I can confirm that the patch above fixed the issue for me.
Comment #4
thedut CreditAttribution: thedut commentedFix Included into the LimeSurvey Sync module 7.x.1.5 and the 6.x-1.5 versions.