Anonymous Login
2017-01-24 06:00 CET

View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
08395Bug reports[All Projects] Survey takingpublic2014-03-17 13:14
Assigned ToDenisChenu 
Product Version2.00+ 
Target VersionFixed in Version2.05+ 
Summary08395: Questions randomly not showing
DescriptionIf in a survey is set to question by question mode and uses both question groups and randomization groups, some questions randomly do not show in the rendered survey.
Steps To ReproduceCreate a new survey.
Set its mode to question by question.
Create two question groups (either with randomization groups or without, this is not relevant to the bug).
Create a couple of question within each question group, but use the same randomization group for each.
Test the survey.
Instead of showing the question and defined answers, the survey will sometimes turn up as shown in the attached screenshot.
TagsNo tags attached.
Complete LimeSurvey version number (& build)131107
I will donate to the project if issue is resolvedNo
Database & DB-Versionmysqld Ver 5.1.61-ndb-7.1.22-log for suse-linux-gnu on x86_64 (SUSE MySQL RPM)
Operating System (Server)OpenSuSE
Webserver software & versionApache/2.2.21 (Linux/SUSE)
PHP Version5.3.8
Attached Files

related to 08452closedDenisChenu Preview Question Group doesn't load randomly with Randomization Group set 



c_schmitz (administrator)

Last edited: 2013-11-22 11:42

View 2 revisions

I am sorry but there is no such thing as 'sometimes'. If it turns up empty it should be reproducible by the actions you did previously.
Did you maybe change the survey while you were testing it? Does it happen if the survey is active?
Anyway, I cannot reproduce it here.


mofog (reporter)

I'm sorry for my unprecise statement. What I meant to say is that due to the randomization of the question order, sometimes the first, second, or third question is empty. It does not mean that the bug appears and disappears 'sometimes'.

No, I did not change the survey while testing it.

Yes, the described behavior can also be observed if the survey is active.


c_schmitz (administrator)

I am sorry, but I still cannot reproduce this here. All questions show here as they should. Can you copy the survey and see if you still have the problem?
If yes, can you remove questions until you have a minimum test case where it is reproducible for you? Please attach the resulting survey as .lss file. Thank you.


mofog (reporter)

I copied the survey and the problem persists.
I reduced the test case to only two question groups with one question each. The problem is still reproducible. However, 'sometimes' both questions are shown, 'sometimes' one or both aren't. For example:

Test#1: Question 1 shows, Question 2 shows.
Test#2: Question 2 shows, Question 1 shows.
Test#3: Question 2 shows, Question 1 shows.
Test#4: Empty question, Question 2 shows.
Test#5: Question 1 shows, Question 2 shows.
Test#6: Question 1 shows, empty question.

To illustrate this, I created a short demo video.


c_schmitz (administrator)

Can you attach your reduced survey, please?


mofog (reporter)

Sorry, of course.


c_schmitz (administrator)

I attached an even more condensed test case - the issue seems to happen if a question is shown in a different question group by randomization.
Fixing this is really tricky and may take some time.


mofog (reporter)

I'm glad we finally got to the root of the problem! Please let me know if you need any help.


c_schmitz (administrator)

It looks like the issue was introduced with conversion to Yii/2.0 - it works fine in 1.92 .


DenisChenu (developer)


Seems the problem is :
                if ($gid != $qa[6]) {
line 1045 of SurveyRunTimeHelper ...

$qa take gid

An before we have :
                if ((isset($ia[10]) && $ia[10] == $gid) || (!isset($ia[10]) && $ia[5] == $gid))
Where $ia are taken from $_SESSION[$LEMsessid]['fieldarray']
And $qa are taken for retrieveAnswers($ia)


DenisChenu (developer)

Last edited: 2014-01-02 18:21

View 2 revisions

With 1.92:

retrieveAnswers use global $gl
And return at 6 : $gl[0] surely updated group number or step

Yep: $gl[0] is the actual gid, we can fix it directly with:
$plus_qanda[5] = $gl['gid'] in SurveyRuntimeHelper.

But i really think the test is not needed because it's done before ($qanda is filled only with needed question).


DenisChenu (developer)

Arglll ... randome question+random group. The evil system \o/

I give a try ....

But i think it's make very difficult to work on 2.1 plugin system actually for this one ....


DenisChenu (developer)

@mofog : think it's fixed now in and some other (see screenshot).

Can you reproduce ?


DenisChenu (developer)

\o/ And adding RAND to the 2 group seems to work too ....


mofog (reporter)

Hi there. I just tested the latest version on github several times regarding this issue and can confirm that this issue seems to be resolved now. Random questions in random groups work fine now. Thanks a lot.


c_schmitz (administrator)

2.05+ Build 140317 released

+Related Changesets

-Issue History
Date Modified Username Field Change
2013-11-20 12:57 mofog New Issue
2013-11-20 12:57 mofog File Added: limesurvey_survey_482775.lss.xml
2013-11-20 12:58 mofog File Added: h6bc55a5.png
2013-11-22 11:42 c_schmitz Note Added: 27313
2013-11-22 11:42 c_schmitz Assigned To => c_schmitz
2013-11-22 11:42 c_schmitz Status new => feedback
2013-11-22 11:42 c_schmitz Note Edited: 27313 View Revisions
2013-11-22 15:02 mofog Note Added: 27326
2013-11-22 15:02 mofog Status feedback => assigned
2013-11-25 14:43 c_schmitz Note Added: 27364
2013-11-25 14:43 c_schmitz Status assigned => feedback
2013-11-26 11:47 mofog File Added: Bug08395.m4v
2013-11-26 11:47 mofog Note Added: 27405
2013-11-26 11:47 mofog Status feedback => assigned
2013-11-27 10:39 c_schmitz Note Added: 27415
2013-11-27 10:39 c_schmitz Status assigned => feedback
2013-11-27 13:10 mofog File Added: limesurvey_survey_596393.lss.xml
2013-11-27 13:11 mofog Note Added: 27421
2013-11-27 13:11 mofog Status feedback => assigned
2013-11-27 15:48 c_schmitz File Added: limesurvey_survey_596393(1).lss
2013-11-27 15:48 c_schmitz File Deleted: limesurvey_survey_596393.lss.xml
2013-11-27 15:49 c_schmitz Note Added: 27431
2013-11-27 22:16 mofog Note Added: 27441
2013-12-18 16:21 c_schmitz File Deleted: limesurvey_survey_482775.lss.xml
2013-12-18 18:52 c_schmitz Note Added: 27619
2013-12-18 21:54 c_schmitz Assigned To c_schmitz => mdekker
2013-12-18 21:54 c_schmitz Status assigned => feedback
2013-12-20 13:08 DenisChenu Relationship added related to 08452
2013-12-28 16:40 DenisChenu Note Added: 27703
2014-01-02 18:12 DenisChenu Note Added: 27715
2014-01-02 18:21 DenisChenu Note Edited: 27715 View Revisions
2014-03-02 22:30 c_schmitz Assigned To mdekker => DenisChenu
2014-03-02 22:30 c_schmitz Status feedback => assigned
2014-03-03 09:39 DenisChenu Note Added: 29068
2014-03-03 19:02 DenisChenu Changeset attached => LimeSurvey master d5889c76
2014-03-03 19:02 DenisChenu File Added: Capture du 2014-03-03 19:00:49.png
2014-03-03 19:02 DenisChenu File Added: Capture du 2014-03-03 19:01:00.png
2014-03-03 19:03 DenisChenu Note Added: 29082
2014-03-03 19:03 DenisChenu Status assigned => feedback
2014-03-03 19:08 DenisChenu File Added: Capture du 2014-03-03 19:07:50.png
2014-03-03 19:08 DenisChenu Note Added: 29083
2014-03-04 11:00 DenisChenu Status feedback => resolved
2014-03-04 11:00 DenisChenu Fixed in Version => 2.05+
2014-03-04 11:00 DenisChenu Resolution open => fixed
2014-03-04 11:13 mofog Note Added: 29088
2014-03-17 13:14 c_schmitz Note Added: 29280
2014-03-17 13:14 c_schmitz Status resolved => closed
+Issue History