View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
13946Bug reportsSurvey takingpublic2020-03-04 23:20
Reportersegui Assigned Tocdorin  
PrioritynoneSeveritypartial_block 
Status closedResolutionduplicate 
Product Version3.13.x 
Summary13946: SQL error when saving a response
Description

When a participant tries to save and resume later, the "An error occurred saving a response to survey" error is being triggered, and an email notification about it is being sent to the survey administrator.

This is the content of the email (I have removed personal information about the participant for obvious reasons, placeholders are between brackets <> ) :


An error occurred saving a response to survey id &lt;Title of the survey> - 524447

DATA TO BE ENTERED:
token: N/A
524447X25693X362066SQ001: &lt;Name>
524447X25693X362066SQ002: &lt;Email>
524447X25693X362066SQ003: &lt;Program>
524447X25693X362067: A2
524447X25693X362067other: 
524447X25693X362069: &lt;Program and year>
524447X25693X362070: &lt;Tutoring> 

524447X25693X362071: &lt;Text about tutoring>
524447X25694X362068: 
524447X25694X362073: 
524447X25694X362073comment: 
524447X25694X363894: 
524447X25694X363894comment: 
524447X25694X362074: 
524447X25694X362074comment: 
524447X25694X362092: 
524447X25694X362092comment: 
524447X25694X363900: 
524447X25694X364070: 
524447X25694X364070comment: 
524447X25694X363901: 
524447X25694X363901comment: 
524447X25694X363902: 
524447X25694X363902comment: 
524447X25694X363903: 
524447X25694X363903comment: 
524447X25694X363904: 
524447X25694X363904comment: 
524447X25694X363905: 
524447X25694X363905comment: 
524447X25694X363906: 
524447X25694X363906comment: 
524447X25694X363907: 
524447X25694X363907comment: 
524447X25694X362076: 
524447X25694X362076comment: 
524447X25694X362077: 
524447X25694X362077comment: 
524447X25694X362072: 
524447X25694X362072comment: 
524447X25694X362081: 
524447X25694X362081comment: 
524447X25694X362075: 
524447X25694X362075comment: 
524447X25694X362079: 
524447X25694X362079comment: 
524447X25694X362082: 
524447X25694X362082comment: 
524447X25694X362083: 
524447X25694X362083comment: 
524447X25694X362084: 
524447X25694X362084comment: 
524447X25694X362085: 
524447X25694X362085comment: 
524447X25694X362086: 
524447X25694X362086comment: 
524447X25694X362087: 
524447X25694X362087comment: 
524447X25694X362088: 
524447X25694X362088comment: 
524447X25694X362089: 
524447X25694X362089comment: 
524447X25694X362090: 
524447X25694X362090comment: 
524447X25694X362091: 
524447X25694X362091comment: 
524447X25694X362080: 
524447X25694X362078: 
524447X25693X362066SQ001: &lt;Name>
524447X25693X362066SQ002: &lt;Email>
524447X25693X362066SQ003: &lt;Program>
524447X25693X362067: A2
524447X25693X362067other: 
524447X25693X362069: &lt;Program and year>
524447X25693X362070:&lt;Tutoring>

524447X25693X362071: &lt;Text about tutoring> 
524447X25694X362068: 
524447X25694X362073: 
524447X25694X362073comment: 
524447X25694X363894: 
524447X25694X363894comment: 
524447X25694X362074: 
524447X25694X362074comment: 
524447X25694X362092: 
524447X25694X362092comment: 
524447X25694X363900: 
524447X25694X364070: 
524447X25694X364070comment: 
524447X25694X363901: 
524447X25694X363901comment: 
524447X25694X363902: 
524447X25694X363902comment: 
524447X25694X363903: 
524447X25694X363903comment: 
524447X25694X363904: 
524447X25694X363904comment: 
524447X25694X363905: 
524447X25694X363905comment: 
524447X25694X363906: 
524447X25694X363906comment: 
524447X25694X363907: 
524447X25694X363907comment: 
524447X25694X362076: 
524447X25694X362076comment: 
524447X25694X362077: 
524447X25694X362077comment: 
524447X25694X362072: 
524447X25694X362072comment: 
524447X25694X362081: 
524447X25694X362081comment: 
524447X25694X362075: 
524447X25694X362075comment: 
524447X25694X362079: 
524447X25694X362079comment: 
524447X25694X362082: 
524447X25694X362082comment: 
524447X25694X362083: 
524447X25694X362083comment: 
524447X25694X362084: 
524447X25694X362084comment: 
524447X25694X362085: 
524447X25694X362085comment: 
524447X25694X362086: 
524447X25694X362086comment: 
524447X25694X362087: 
524447X25694X362087comment: 
524447X25694X362088: 
524447X25694X362088comment: 
524447X25694X362089: 
524447X25694X362089comment: 
524447X25694X362090: 
524447X25694X362090comment: 
524447X25694X362091: 
524447X25694X362091comment: 
524447X25694X362080: 
524447X25694X362078: 

SQL CODE THAT FAILED:

UPDATE {{survey_524447}} SET `lastpage`=0, `524447X25694X362068`='', `524447X25694X362073`='', `524447X25694X362073comment`='', `524447X25694X363894`='', `524447X25694X363894comment`='', `524447X25694X362074`='', `524447X25694X362074comment`='', `524447X25694X362092`='', `524447X25694X362092comment`='', `524447X25694X363900`='', `524447X25694X364070`='', `524447X25694X364070comment`='', `524447X25694X363901`='', `524447X25694X363901comment`='', `524447X25694X363902`='', `524447X25694X363902comment`='', `524447X25694X363903`='', `524447X25694X363903comment`='', `524447X25694X363904`='', `524447X25694X363904comment`='', `524447X25694X363905`='', `524447X25694X363905comment`='', `524447X25694X363906`='', `524447X25694X363906comment`='', `524447X25694X363907`='', `524447X25694X363907comment`='', `524447X25694X362076`='', `524447X25694X362076comment`='', `524447X25694X362077`='', `524447X25694X362077comment`='', `524447X25694X362072`='', `524447X25694X362072comment`='', `524447X25694X362081`='', `524447X25694X362081comment`='', `524447X25694X362075`='', `524447X25694X362075comment`='', `524447X25694X362079`='', `524447X25694X362079comment`='', `524447X25694X362082`='', `524447X25694X362082comment`='', `524447X25694X362083`='', `524447X25694X362083comment`='', `524447X25694X362084`='', `524447X25694X362084comment`='', `524447X25694X362085`='', `524447X25694X362085comment`='', `524447X25694X362086`='', `524447X25694X362086comment`='', `524447X25694X362087`='', `524447X25694X362087comment`='', `524447X25694X362088`='', `524447X25694X362088comment`='', `524447X25694X362089`='', `524447X25694X362089comment`='', `524447X25694X362090`='', `524447X25694X362090comment`='', `524447X25694X362091`='', `524447X25694X362091comment`='', `524447X25694X362080`='', `524447X25694X362078`='' WHERE ID=438

ERROR MESSAGE:

There is no error message at the end of the email, it just ends there.

The thing that jumps to me right away is that the table name in that sql update statement is incorrect. Our Limesurvey installation uses the "lime_" prefix on tables, so it should be lime_survey_524447 instead of survey_524447. So it looks like somehow the Limesurvey code is not taking into account the table prefix when building that query.

Steps To Reproduce

I don't have steps to reproduce, just the notification email sent by the system.

TagsNo tags attached.
Attached Files
Bug heat12
Complete LimeSurvey version number (& build)Version 3.13.2+180709
I will donate to the project if issue is resolvedNo
BrowserGoogle Chrome Version 56.0.2924.87 (64-bit)
Database type & versionmysql Ver 14.14 Distrib 5.5.60, for Linux (x86_64) using readline 5.1; Limesurvey dbversionnumber = 353
Server OS (if known)CentOS release 6.9
Webserver software & version (if known)Apache/2.2.15 (Unix)
PHP VersionPHP 5.6.36

Relationships

duplicate of 13880 closedollehar Error when restarting a not yet finished survey 

Users monitoring this issue

There are no users monitoring this issue.

Activities

ollehar

ollehar

2018-08-08 11:02

administrator   ~48753

Can you please attach the offending survey?

gslines

gslines

2018-08-08 16:38

reporter   ~48762

Attached.

ollehar

ollehar

2018-08-08 17:51

administrator   ~48763

Sorry, still cannot reproduce. Do you know which questions were answered? Can you reproduce it your self?

MerkOne

MerkOne

2018-08-09 12:40

reporter   ~48764

I think this issue maybe related to this one I have just raised: https://bugs.limesurvey.org/view.php?id=13950

"CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Implicit conversion from data type nvarchar to varbinary(max) is not allowed. Use the CONVERT function to run this query."

LouisGac

LouisGac

2018-08-09 17:55

developer   ~48768

your bug ticket says that you're using MySQL. Are you indeed using mssql?

Mazi

Mazi

2018-08-17 15:12

updater   ~48821

Wasn't there an issue a while ago which caused the DB prefix to not be set properly?

ArneD

ArneD

2018-08-17 22:54

reporter   ~48822

Same Issue here 13880

gslines

gslines

2018-08-22 15:08

reporter   ~48854

@Mazi: I am suspecting that is what is happening here.

Yes, I would say is the same scenario described in https://bugs.limesurvey.org/view.php?id=13880.

Issue History

Date Modified Username Field Change
2018-08-07 19:25 segui New Issue
2018-08-08 11:02 ollehar Note Added: 48753
2018-08-08 11:03 ollehar Status new => feedback
2018-08-08 16:38 gslines File Added: limesurvey_survey_524447.lss
2018-08-08 16:38 gslines Note Added: 48762
2018-08-08 17:51 ollehar Note Added: 48763
2018-08-09 12:40 MerkOne Note Added: 48764
2018-08-09 17:55 LouisGac Note Added: 48768
2018-08-17 15:12 Mazi Note Added: 48821
2018-08-17 22:54 ArneD Note Added: 48822
2018-08-22 15:08 gslines Note Added: 48854
2019-11-26 17:41 cdorin Assigned To => cdorin
2019-11-26 17:41 cdorin Status feedback => assigned
2020-03-04 23:20 c_schmitz Status assigned => closed
2020-03-04 23:20 c_schmitz Resolution open => duplicate
2020-03-04 23:20 c_schmitz Relationship added duplicate of 13880