View Issue Details

This bug affects 1 person(s).
 16
IDProjectCategoryView StatusLast Update
11283Bug reportsSurvey editingpublic2016-06-13 12:26
Reporterbrmi0019 Assigned ToLouisGac 
PriorityurgentSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.50.x 
Fixed in Version2.50.x 
Summary11283: pagination in Questions in this survey causes a SQL error (MSSQL)
Description

When navigate to another page in List questions a SQL error occures:
Msg 207, Level 16, State 1, Line 11
Invalid column name 'group_order'.
Msg 207, Level 16, State 1, Line 12
Invalid column name 'group_order'.

Steps To Reproduce

1) edit a Survey
2) List questions
3) navigate to page 2

Additional Information

wrong SQL statement:
SELECT qid, parent_qid, sid, gid, type, title, question, preg, help, other, mandatory, question_order, language, scale_id, same_default, [relevance], modulename
FROM (SELECT TOP (10) qid, parent_qid, sid, gid, type, title, question, preg, help, other, mandatory, question_order, language, scale_id, same_default, [relevance],
modulename
FROM (SELECT TOP (20) t.qid, t.parent_qid, t.sid, t.gid, t.type, t.title, t.question, t.preg, t.help, t.other, t.mandatory, t.question_order, t.language, t.scale_id,
t.same_default, t.[relevance], t.modulename
FROM tbl_questions AS t LEFT OUTER JOIN
tbl_groups AS groups ON groups.gid = t.gid AND t.language = groups.language AND groups.sid = t.sid
WHERE (t.sid = N'<sid>') AND (t.language = N'<lang>') AND (t.parent_qid = 0)
ORDER BY groups.group_order, t.question_order) AS inner
ORDER BY group_order DESC, question_order DESC) AS outer
ORDER BY group_order, question_order

group_order should only be used in the inner subquery

TagsNo tags attached.
Bug heat16
Complete LimeSurvey version number (& build)160526
I will donate to the project if issue is resolvedNo
BrowserIE11
Database type & versionSQL Server 2012 & 258
Server OS (if known)Windows Server 2k8 R2
Webserver software & version (if known)IIS 7.5
PHP Version5.4.41

Relationships

has duplicate 11310 closedc_schmitz List Questions Pagination Error/Break Cannot Display Question 
related to 11353 closedLouisGac Unable to movbe to next page on survey list 

Users monitoring this issue

Drewskie, radhwaw

Activities

LouisGac

LouisGac

2016-06-02 16:28

developer   ~39093

carsten: could you confirm the bug please?

radhwaw

radhwaw

2016-06-03 18:12

reporter   ~39222

Please fix this bug

radhwaw

radhwaw

2016-06-07 19:41

reporter   ~39306

Are there any updates for this issue? I think it's an important issue because user/administrator won't be able to navigate to the next page (2nd, 3rd, ..., last) of the list questions. Please take concern to this issue.

LouisGac

LouisGac

2016-06-09 12:09

developer   ~39340

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

LouisGac

LouisGac

2016-06-09 12:10

developer   ~39341

So I just fixed it.
I would advise you anyway not to use mssql.

radhwaw

radhwaw

2016-06-09 14:38

reporter   ~39362

I have tried to implement this fixation, it doesn't show error, but now the content of the page doesn't change either. Page 1, page 2, and so on show the same content/questions.

LouisGac

LouisGac

2016-06-09 15:46

developer   ~39365

I'm looking for a true fix. Just for you to know, if you first order the list by a column (cliking on a table header), then pagination works.

LouisGac

LouisGac

2016-06-09 16:06

developer   ~39370

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

radhwaw

radhwaw

2016-06-09 17:09

reporter   ~39378

Thank you so much for the hard work. I just want to contribute to make LimeSurvey be better and better by informing the bugs. :)

LouisGac

LouisGac

2016-06-09 17:38

developer   ~39382

yeah you're doing it fine.
can you just confirm that it's working fine for you now?

radhwaw

radhwaw

2016-06-09 18:14

reporter   ~39386

Yeah I can confirm that it works fine so far. Thanks for the fix.

c_schmitz

c_schmitz

2016-06-13 12:26

administrator   ~39480

Version 2.50 Build 160613 released

Related Changesets

LimeSurvey: master 5ae62cc7

2016-06-09 10:09:02

LouisGac

Details Diff
Fixed issue 11283: pagination in Questions in this survey causes a SQL error (MSSQL) Affected Issues
11283
mod - application/models/Question.php Diff File

LimeSurvey: master 5bd6ba36

2016-06-09 14:06:03

LouisGac

Details Diff
Fixed issue 11353: Unable to movbe to next page on survey list
Fixed issue 11283: pagination in Questions in this survey causes a SQL error (MSSQL)
Affected Issues
11283, 11353
mod - application/models/Question.php Diff File
mod - application/models/Survey.php Diff File

Issue History

Date Modified Username Field Change
2016-05-27 13:36 brmi0019 New Issue
2016-05-27 20:59 c_schmitz Priority none => urgent
2016-06-01 09:04 c_schmitz Relationship added has duplicate 11310
2016-06-02 09:53 radhwaw Issue Monitored: radhwaw
2016-06-02 16:28 LouisGac Assigned To => c_schmitz
2016-06-02 16:28 LouisGac Status new => assigned
2016-06-02 16:28 LouisGac Note Added: 39093
2016-06-03 18:12 radhwaw Note Added: 39222
2016-06-07 19:41 radhwaw Note Added: 39306
2016-06-08 12:55 c_schmitz Relationship added related to 11353
2016-06-09 11:05 LouisGac Sticky Issue No => Yes
2016-06-09 12:02 Drewskie Issue Monitored: Drewskie
2016-06-09 12:09 LouisGac Changeset attached => LimeSurvey master 5ae62cc7
2016-06-09 12:09 LouisGac Note Added: 39340
2016-06-09 12:09 LouisGac Assigned To c_schmitz => LouisGac
2016-06-09 12:09 LouisGac Resolution open => fixed
2016-06-09 12:10 LouisGac Note Added: 39341
2016-06-09 12:12 LouisGac Sticky Issue Yes => No
2016-06-09 12:12 LouisGac Status assigned => resolved
2016-06-09 14:38 radhwaw Note Added: 39362
2016-06-09 14:59 LouisGac Sticky Issue No => Yes
2016-06-09 15:46 LouisGac Note Added: 39365
2016-06-09 16:06 LouisGac Changeset attached => LimeSurvey master 5bd6ba36
2016-06-09 16:06 LouisGac Note Added: 39370
2016-06-09 17:07 c_schmitz Sticky Issue Yes => No
2016-06-09 17:09 radhwaw Note Added: 39378
2016-06-09 17:38 LouisGac Note Added: 39382
2016-06-09 18:14 radhwaw Note Added: 39386
2016-06-10 15:42 Jelle_S Changeset attached => LimeSurvey master 3065832d
2016-06-10 15:42 Jelle_S Assigned To LouisGac => Jelle_S
2016-06-10 15:49 c_schmitz Changeset removed LimeSurvey master 3065832d =>
2016-06-12 10:16 c_schmitz Status resolved => assigned
2016-06-12 10:16 c_schmitz Assigned To Jelle_S => LouisGac
2016-06-12 10:16 c_schmitz Status assigned => resolved
2016-06-12 10:16 c_schmitz Fixed in Version => 2.5
2016-06-13 12:26 c_schmitz Note Added: 39480
2016-06-13 12:26 c_schmitz Status resolved => closed
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing
2021-08-02 17:13 guest Bug heat 12 => 16