View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
06424Bug reportsSurvey takingpublic2012-08-08 13:55
Reportertim44202 Assigned Toc_schmitz  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version1.92+ 
Fixed in Version1.92+ 
Summary06424: SQL Server Error - Taking Survey
Description

After an update any user taking a survey receives the following error:

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'lastpage'.:UPDATE lime_survey_62944 SET [lastpage]='1', [62944X29X135]='123456', [62944X29X155]='654321', [62944X29X136]='123', [62944X29X137]='ABC', [62944X29X138]='1' WHERE ID=82

The data entry Function works fine. The DB is SQL Server 2005

The present version is 1.92 the error occurred after applying a build using comfortupdate. There were no errors during update. It went unreported by our user so I am not sure which build triggered the problem.

Problem occurs on all surveys on two different internal LimeSurvey web sites.

Steps To Reproduce

Take this short survey.

http://limesurvey.jfsa-cleveland.org/index.php?sid=62944&lang=en

Question 1 any two digit response between 60 and 79.
Question 2 any two digit response between 20 and 39.
Question 3 any three digit response.
Question 4 any three letter response.
Question 5 either radio button.

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)120801
I will donate to the project if issue is resolvedYes
BrowserInternet Explorer 8 or Google Chrome 21.0.1180.60 m
Database type & versionMS SQL Server 2005
Server OS (if known)Windows 2008
Webserver software & version (if known)Apache/2.2.14 (Win32) PHP/5.2.12
PHP VersionPHP Version 5.2.12

Users monitoring this issue

There are no users monitoring this issue.

Activities

Mazi

Mazi

2012-08-03 23:49

updater   ~20177

I can reproduce the problem following the steps described above.

Can you attach the DB backup which was created prior to the update (should be located at /tmp?!
We can mark this ticket private so only developers will be able to access the file.

From which version did you update?

c_schmitz

c_schmitz

2012-08-05 18:38

administrator   ~20208

Last edited: 2012-08-06 11:23

Which DB driver are you using in config.php?
mssql_n, mssql_odbc or mssqlnative ?

c_schmitz

c_schmitz

2012-08-06 11:23

administrator   ~20218

?

tim44202

tim44202

2012-08-06 15:05

reporter   ~20226

ODBC Support enabled
Active Persistent Links 0
Active Links 1
ODBC library Win32

c_schmitz

c_schmitz

2012-08-06 15:06

administrator   ~20227

I am sorry, that's not the answer to my question. Can you please re-read?

tim44202

tim44202

2012-08-06 15:30

reporter   ~20228

Sorry is this what you wanted?

$databasetype = 'odbc_mssql';
$databaselocation = 'SQL02';
$databasename = 'limesurvey'

c_schmitz

c_schmitz

2012-08-06 20:58

administrator   ~20233

Last edited: 2012-08-06 21:00

Yes, thank you. I will retest the upgrade and let you know.
The quickfix for you is to add a field 'lastpage' of type 'int' to every survey_<surveyID> table. Ideally the upgrade should have done this for you. Did you maybe upgrade with too tight security settings? You should have received lots of errors during DB upgrade, though.

Maybe you can restore the original database and try to assign root permissions to the LimeSurvey DB user, then run the upgrade again. Because if this has failed more stuff may have failed.

tim44202

tim44202

2012-08-06 21:26

reporter   ~20234

The workaround cured the problem.

I just noticed that only one of the two Limesurvey websites has this problem.
Perhaps one of the updates altered the db and it was skipped and or failed on one of them.

c_schmitz

c_schmitz

2012-08-07 20:47

administrator   ~20254

Fix committed to Yii branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=9262

c_schmitz

c_schmitz

2012-08-07 20:47

administrator   ~20255

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=9263

c_schmitz

c_schmitz

2012-08-07 20:47

administrator   ~20256

It was indeed an error in the update script. Thank you for bringing this to our attention.

Related Changesets

LimeSurvey: master 9f131938

2012-08-07 11:44:05

c_schmitz

Details Diff
Fixed issue 06424: Lastpage field not being added in MSSQL when upgrading from 1.85 or older Affected Issues
06424
mod - common_functions.php Diff File

LimeSurvey: Yii 2401db5a

2012-08-07 11:47:01

c_schmitz

Details Diff
Fixed issue 06424: Lastpage field not being added in MSSQL when upgrading from 1.85 or older Affected Issues
06424
mod - application/helpers/database_helper.php Diff File

Issue History

Date Modified Username Field Change
2012-08-03 23:26 tim44202 New Issue
2012-08-03 23:49 Mazi Note Added: 20177
2012-08-03 23:49 Mazi Assigned To => c_schmitz
2012-08-03 23:49 Mazi Status new => feedback
2012-08-05 18:38 c_schmitz Note Added: 20208
2012-08-06 11:23 c_schmitz Note Edited: 20208
2012-08-06 11:23 c_schmitz Note Added: 20218
2012-08-06 15:05 tim44202 Note Added: 20226
2012-08-06 15:05 tim44202 Status feedback => assigned
2012-08-06 15:06 c_schmitz Note Added: 20227
2012-08-06 15:06 c_schmitz Status assigned => feedback
2012-08-06 15:30 tim44202 Note Added: 20228
2012-08-06 15:30 tim44202 Status feedback => assigned
2012-08-06 20:58 c_schmitz Note Added: 20233
2012-08-06 21:00 c_schmitz Note Edited: 20233
2012-08-06 21:26 tim44202 Note Added: 20234
2012-08-07 20:47 c_schmitz Changeset attached => LimeSurvey Yii 2401db5a
2012-08-07 20:47 c_schmitz Note Added: 20254
2012-08-07 20:47 c_schmitz Resolution open => fixed
2012-08-07 20:47 c_schmitz Changeset attached => LimeSurvey master 9f131938
2012-08-07 20:47 c_schmitz Note Added: 20255
2012-08-07 20:47 c_schmitz Note Added: 20256
2012-08-07 20:48 c_schmitz Status assigned => resolved
2012-08-07 20:48 c_schmitz Fixed in Version => 1.92+
2012-08-08 13:55 c_schmitz Status resolved => closed