View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
04797Bug reportsSurvey takingpublic2011-06-05 23:00
Reporteruser9586Assigned Touser9586 
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version1.90+ 
Fixed in Version2.00a1 
Summary04797: In group-by-group mode, it's impossible to advance to the next page if a group is comprised entirely of hidden cond. questions
Description

In group-by-group mode, if a group is comprised entirely of conditional questions, and all the questions in the group are hidden as a result of the condition, it's impossible to advance in the survey. Clicking next will not advance to the next page.

Steps To Reproduce

Use the following layout in group-by-group mode:

  • group 1:
    • yes/no
  • group 2:
    • boilerplate depending on yes
  • group 3:
    • boilerplate

Preview the survey. Select 'no' on the first question. Clicking 'next' will not jump to group 3 (current page stays at group 1).

Adding a non-conditional question to group 2 will make 'next' work.

See the attached survey.

TagsNo tags attached.
Attached Files
patch.diff (781 bytes)   
Index: group.php
===================================================================
--- group.php	(revision 9698)
+++ group.php	(working copy)
@@ -24,7 +24,8 @@
 $show_empty_group = false;
 if (!isset($homedir) || isset($_REQUEST['$homedir'])) {die("Cannot run this script directly");}
 
-if ($previewgrp){
+if ($previewgrp)
+{
 	$_SESSION['prevstep'] = 1;
 	$_SESSION['maxstep'] = 0;
 }
@@ -93,7 +94,7 @@
     {
         while(isset($_SESSION['grouplist'][$_SESSION['step']-1]) && checkgroupfordisplay($_SESSION['grouplist'][$_SESSION['step']-1][0]) === false)
         {
-            if ($_SESSION['prevstep'] <= $_SESSION['step'])
+            if ($_SESSION['prevstep'] > $_SESSION['step'])
             {
                 $_SESSION['step']=$_SESSION['step']-1;
             }
patch.diff (781 bytes)   
Bug heat6
Complete LimeSurvey version number (& build)9586
I will donate to the project if issue is resolvedNo
Browser
Database type & version-
Server OS (if known)-
Webserver software & version (if known)-
PHP Version-

Users monitoring this issue

There are no users monitoring this issue.

Activities

lemeur

lemeur

2010-12-11 09:23

developer   ~13751

I can't reproduce the pb with the attached survey on my 9624 (svn version).
Can you check again with the latest Dev version (SVN) ?

user9586

2010-12-13 18:32

  ~13774

I cleaned the DB and imported from scratch just to be sure.
Still reproducible in r9637 (_dev).

lemeur

lemeur

2010-12-14 22:04

developer   ~13784

tpartner confirms it's working great for him as well.
We must find out the difference in your setup.

Can you test with different browsers ?
Can you check your magic_quotes setup in php.ini and try with different settings ?
Same thing for "Strict mode" or not in your DB configuration?

Thibault

user9586

2010-12-16 12:46

  ~13804

Tested with Firefox, IE and Chrome.
magicquotes* is "Off".
$debug = 3, which turns on STRICT_ALL_TABLES in common.php. Temporarily commenting line 209 made no difference though.
PHP is "PHP 5.3.2-1ubuntu4.5 with Suhosin-Patch (cli) (built: Sep 17 2010 13:49:46)", the default from "Ubuntu Lucid LTS", running as an apache2 module.
The following extensions are being used: XDebug and APC.
Disabling those made no difference.

user9586

2010-12-16 12:48

  ~13805

Forgot: the DB backend is mysql 5.1.41.

lemeur

lemeur

2010-12-16 22:36

developer   ~13808

Humm, I've got same setup here (magic quotes Off, debug=3, so STRICT mode ON), but I still can't reproduce the pb.

Might be something else... but what ?
Suhosin-Patch can sometimes be problematic (at least in the design GUI), so I would recommend to check your logs and try to disable it (just for the test).
Do you have mod_security set ? If yes, could you disable it as well.
Do you see strange messages in your httpd error_log ?

lemeur

lemeur

2011-01-09 12:12

developer   ~13869

wavexx, any feedback ?

user9586

2011-01-10 16:11

  ~13873

Still reproducible here with the submitted survey. I didn't have time to do a debugging session on this yet, so please leave the bug open. I will try to see if this affects the latest RC.

LS seems to be stuck on a loop in group.php while checking conditions (but as I said, I didn't trace down the reason yet).

user9586

2011-01-17 17:36

  ~13936

I've additionally discovered that if you add another page, depending on the first condition:

  • group 1:
    • q1: yes/no
  • group 2:
    • q2: boilerplate depending on q1:yes
  • group 3:
    • q3: boilerplate depending on q1:yes
  • group 3:
    • boilerplate

You cannot advance beyond q2 even if you pick "yes".
I'm starting to debug this now.

user9586

2011-01-17 18:28

  ~13937

Ok, I think I've nailed it down. Can somebody doublecheck this?

group.php:97 reads:

        if ($_SESSION['prevstep'] &lt;= $_SESSION['step'])

but if you look carefully, the condition is reversed. If prevstep is <= step it means we're going forward, not backward.

Changing it to:

        if ($_SESSION['prevstep'] > $_SESSION['step'])

fixes the problem for me.

user9586

2011-01-17 18:29

  ~13938

Patch attached (just let me know if that works, so I can commit).

user9586

2011-01-19 17:22

  ~13946

Any news? I think this bug is pretty serious for the release.

lemeur

lemeur

2011-01-19 17:31

developer   ~13947

Carsten,
What do you think bout this ?

c_schmitz

c_schmitz

2011-01-26 22:49

administrator   ~13982

Wavexx, your explanation makes sense. If you tested it please commit.

user9586

2011-01-31 10:50

  ~14002

Committed in 09734.

Issue History

Date Modified Username Field Change
2010-12-06 17:26 user9586 New Issue
2010-12-06 17:26 user9586 File Added: limesurvey_survey_59528.lss
2010-12-07 14:11 c_schmitz Assigned To => lemeur
2010-12-07 14:11 c_schmitz Status new => assigned
2010-12-11 09:23 lemeur Note Added: 13751
2010-12-11 09:23 lemeur Status assigned => feedback
2010-12-13 18:32 user9586 Note Added: 13774
2010-12-13 18:32 user9586 Status feedback => assigned
2010-12-14 22:04 lemeur Note Added: 13784
2010-12-14 22:36 Mazi Status assigned => feedback
2010-12-16 12:46 user9586 Note Added: 13804
2010-12-16 12:46 user9586 Status feedback => assigned
2010-12-16 12:48 user9586 Note Added: 13805
2010-12-16 22:36 lemeur Note Added: 13808
2010-12-21 18:46 lemeur Status assigned => feedback
2011-01-09 12:12 lemeur Note Added: 13869
2011-01-10 16:11 user9586 Note Added: 13873
2011-01-10 16:11 user9586 Status feedback => assigned
2011-01-17 17:36 user9586 Note Added: 13936
2011-01-17 18:28 user9586 Note Added: 13937
2011-01-17 18:29 user9586 File Added: patch.diff
2011-01-17 18:29 user9586 Note Added: 13938
2011-01-19 17:22 user9586 Note Added: 13946
2011-01-19 17:31 lemeur Assigned To lemeur => c_schmitz
2011-01-19 17:31 lemeur Note Added: 13947
2011-01-26 22:49 c_schmitz Assigned To c_schmitz => user9586
2011-01-26 22:49 c_schmitz Note Added: 13982
2011-01-31 10:50 user9586 Note Added: 14002
2011-01-31 10:51 user9586 Status assigned => resolved
2011-01-31 10:51 user9586 Fixed in Version => 2.00a1
2011-01-31 10:51 user9586 Resolution open => fixed
2011-06-05 23:00 c_schmitz Status resolved => closed