View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
09482Bug reportsResponse browsingpublic2015-02-11 15:57
Reporterjguilbaud Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.05+ 
Fixed in Version2.05+ 
Summary09482: Conflict id between questions id an subquestion id
Description

I have a survey with 15 questions

All questions except question Q4 (which is Multiple choice) are Yes/No
After creating questions, we have reordered them.

Order on admin is Correct but when executing survey, order is not respected

we have that :


Q1 - Question 1 (Y/N)
Q2 - Question 2 (Y/N)
Q3 - Question 3 (multiple choice)
1 - Choice1
2 - Choice2
3 - Choice3
Q11 - Question 11 (Y/N)
Q12 - Question 12 (Y/N)
Q13 - Question 13 (Y/N)
Q14 - Question 11 (Y/N)
Q4 - Question 4 (Y/N)
Q5 - Question 5 (Y/N)
Q6 - Question 6 (Y/N)
...
Q10 - Question 10 (Y/N)


Q11 to q14 should be after Q10 and not between Q3 and Q4

After investigation i think have found the reason of the bug

In BDD, table questions :
title - QID - parentqid - type
Q11 - 42 - 0 - Y
Q12 - 43 - 0 - Y
Q3 - 4 - 0 - M
1 - 50 - 4 - M
2 - 50 - 4 - M
3 - 50 - 4 - M

In generated html code

question id,name etc for html attributes use the format <sid>X<gid>X<qid>
answers of question "multiple choice" use the format <sid>X<gid>X<qid><title>

so, with my example (sid = 1234 & gid = 10)
html id for Q3 is 1234X10X4
html id for choice 1 of Q3 is 1234X10X41 (qid = 4 and title = 1)
html id for choice 2 of Q3 is 1234X10X42 (qid = 4 and title = 2)
html id for choice 2 of Q3 is 1234X10X43 (qid = 4 and title = 3)
html id for Q11 is 1234X10X42

So Choice 2 of Q3 and Q11 have the same id : 1234X10X42 (idem with choice 3 and q12).

Maybe there is others impacts...
The bug bug appears only if title/question code of answers in multiple choice are integere
if i edit answers of Q3 to have that (add a 'R' in title):
Q3 - Question 3 (multiple choice)
R1 - Choice1
R2 - Choice2
R3 - Choice3

there is no bug.

Hope my explication is understable, english is not my native language...

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)build14122
I will donate to the project if issue is resolvedNo
Browsern/c
Database type & versionMySQL5
Server OS (if known)RHEL6
Webserver software & version (if known)Apache 2
PHP VersionPHP 5.4

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2015-01-28 17:10

administrator   ~31519

Please attach a small test survey. Thank you.

jguilbaud

jguilbaud

2015-01-29 09:24

reporter   ~31526

test survey attached but you can't reproduced the bug only with this survey because depend on IDs in BDD

c_schmitz

c_schmitz

2015-01-29 11:19

administrator   ~31527

I see the problem. To be frank the problem is very rare and IMHO you should not be able to activate this survey anyway, as an according check for this issue is done by LimeSurvey on activation.

Can you please test it?

jguilbaud

jguilbaud

2015-01-29 11:55

reporter   ~31532

Yes the survey can be activated !

c_schmitz

c_schmitz

2015-01-29 11:57

administrator   ~31533

Would it be possible to get a dump of the database? All data would be treated confidentially. If yes please send it to carsten.schmitz@limesurvey.org

jguilbaud

jguilbaud

2015-01-29 12:05

reporter   ~31537

Last edited: 2015-01-29 12:06

Mail sent ;)
The concerned survey is 143469 'Sondage qui buggue'

c_schmitz

c_schmitz

2015-01-30 13:16

administrator   ~31564

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

c_schmitz

c_schmitz

2015-01-30 13:17

administrator   ~31565

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

c_schmitz

c_schmitz

2015-01-30 13:23

administrator   ~31566

Check on activation is fixed, again.

jguilbaud

jguilbaud

2015-01-30 14:41

reporter   ~31572

Thanks !

I have patched my installation (dev server) and when activating i got an error message about duplicated ids with link to resolve problem => it works fine :)

c_schmitz

c_schmitz

2015-02-11 15:57

administrator   ~31661

Version 2.05 Build 150211 released

Related Changesets

LimeSurvey: master 6ea9b477

2015-01-30 12:16:19

c_schmitz

Details Diff
Fixed issue 09482: Missing check for duplicate question IDs on activation Affected Issues
09482
mod - application/helpers/admin/activate_helper.php Diff File
mod - application/helpers/common_helper.php Diff File

LimeSurvey: 2.06 15fc18c3

2015-01-30 12:17:51

c_schmitz

Details Diff
Fixed issue 09482: Missing check for duplicate question IDs on activation Affected Issues
09482
mod - application/helpers/admin/activate_helper.php Diff File
mod - application/helpers/common_helper.php Diff File

Issue History

Date Modified Username Field Change
2015-01-28 17:04 jguilbaud New Issue
2015-01-28 17:10 c_schmitz Note Added: 31519
2015-01-28 17:10 c_schmitz Assigned To => c_schmitz
2015-01-28 17:10 c_schmitz Status new => feedback
2015-01-29 09:22 jguilbaud File Added: limesurvey_survey_424741.lss
2015-01-29 09:24 jguilbaud Note Added: 31526
2015-01-29 09:24 jguilbaud Status feedback => assigned
2015-01-29 11:19 c_schmitz Note Added: 31527
2015-01-29 11:19 c_schmitz Status assigned => feedback
2015-01-29 11:55 jguilbaud Note Added: 31532
2015-01-29 11:55 jguilbaud Status feedback => assigned
2015-01-29 11:57 c_schmitz Note Added: 31533
2015-01-29 11:58 c_schmitz Status assigned => feedback
2015-01-29 12:05 jguilbaud Note Added: 31537
2015-01-29 12:05 jguilbaud Status feedback => assigned
2015-01-29 12:06 jguilbaud Note Edited: 31537
2015-01-30 13:16 c_schmitz Changeset attached => LimeSurvey master 6ea9b477
2015-01-30 13:16 c_schmitz Note Added: 31564
2015-01-30 13:16 c_schmitz Resolution open => fixed
2015-01-30 13:17 c_schmitz Changeset attached => LimeSurvey 2.06 15fc18c3
2015-01-30 13:17 c_schmitz Note Added: 31565
2015-01-30 13:23 c_schmitz Note Added: 31566
2015-01-30 13:23 c_schmitz Status assigned => resolved
2015-01-30 13:23 c_schmitz Fixed in Version => 2.05+
2015-01-30 14:41 jguilbaud Note Added: 31572
2015-02-11 15:57 c_schmitz Note Added: 31661
2015-02-11 15:57 c_schmitz Status resolved => closed