View Issue Details

IDProjectCategoryView StatusLast Update
13946Bug reports[All Projects] Survey takingpublic2018-08-17 22:54
ReporterseguiAssigned To 
PrioritynoneSeveritymajor 
Status feedbackResolutionopen 
Product Version3.13.x 
Target VersionFixed in Version 
Summary13946: SQL error when saving a response
DescriptionWhen 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 <Title of the survey> - 524447
    
    DATA TO BE ENTERED:
    token: N/A
    524447X25693X362066SQ001: <Name>
    524447X25693X362066SQ002: <Email>
    524447X25693X362066SQ003: <Program>
    524447X25693X362067: A2
    524447X25693X362067other:
    524447X25693X362069: <Program and year>
    524447X25693X362070: <Tutoring>
    
    524447X25693X362071: <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: <Name>
    524447X25693X362066SQ002: <Email>
    524447X25693X362066SQ003: <Program>
    524447X25693X362067: A2
    524447X25693X362067other:
    524447X25693X362069: <Program and year>
    524447X25693X362070:<Tutoring>
    
    524447X25693X362071: <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 ReproduceI don't have steps to reproduce, just the notification email sent by the system.
TagsNo tags attached.
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 & DB-Versionmysql Ver 14.14 Distrib 5.5.60, for Linux (x86_64) using readline 5.1; Limesurvey dbversionnumber = 353
Operating System (Server)CentOS release 6.9
Webserver software & versionApache/2.2.15 (Unix)
PHP VersionPHP 5.6.36

Activities

olle

olle

2018-08-08 11:02

administrator   ~48753

Can you please attach the offending survey?
gslines

gslines

2018-08-08 16:38

reporter   ~48762

Attached.

limesurvey_survey_524447.lss (120,386 bytes)
olle

olle

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

manager   ~48768

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

Mazi

2018-08-17 15:12

developer   ~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

Issue History

Date Modified Username Field Change
2018-08-07 19:25 segui New Issue
2018-08-08 11:02 olle Note Added: 48753
2018-08-08 11:03 olle 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 olle 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