View Issue Details

This issue affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
08079Bug reportsSurvey takingpublic2013-08-07 19:42
Reportermfaber Assigned To 
PriorityhighSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.05 RC 
Summary08079: Problem with ranking question in 2.05: False message about use of browsers 'back button'
Description

When taking the attached test survey and the submit button is clicked, the message about having used the 'browsers back button' appears, the form is reset and the participant's answers are lost.

The participant has then to fill the question again. When clicking 'submit' the second time, the message does not appear anymore and the answers are recorded.

1-question test survey attached

Steps To Reproduce

activate and take the attached survey...
don't need to fill anything, just click on submit
Message appears.

TagsNo tags attached.
Attached Files
browserbuttons.lss (13,078 bytes)
Bug heat2
Complete LimeSurvey version number (& build)130804
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMySQL 5.0.10
Server OS (if known)Win7
Webserver software & version (if known)Apache/2.4.3 (Win32)
PHP VersionPhP 5.4.7
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

mfaber

mfaber

2013-08-06 22:21

reporter   ~25939

I narrowed the problem down quite a bit but I am pretty puzzled:

When a ranking question is on the page and "submit" is clicked, ($_SESSION[$LEMsessid]['LEMpostKey'] and $_POST['LEMpostKey'] do not match and the message about having used the browsers back button appears.

They do not match because the function run($surveyid,$args) in surveyruntimehelper.php is called twice and with it
"$_SESSION[$LEMsessid]['LEMpostKey'] = mt_rand();"

So, when submit is clicked the LEMpostKey in $_SESSION will be different from the one received from the created html (via $_POST).

Oddly, if I remove
2180> Yii::app()->getClientScript()->registerCssFile("ranking.css");
from qanda_helper.php, everything works as expected.

mfaber

mfaber

2013-08-07 19:40

reporter   ~25940

Problem is fixed by Sam's commit:
http://github.com/LimeSurvey/LimeSurvey/commit/bba0dc872bd1080fcb0edbc3a590fa85b5eabcb1

Issue History

Date Modified Username Field Change
2013-08-04 22:05 mfaber New Issue
2013-08-04 22:05 mfaber File Added: browserbuttons.lss
2013-08-06 16:52 mfaber File Deleted: browserbuttons.lss
2013-08-06 16:53 mfaber File Added: browserbuttons.lss
2013-08-06 22:21 mfaber Note Added: 25939
2013-08-06 22:23 mfaber Summary Answers not recorded: Use of browsers 'back button' => Problem with ranking question in 2.05: False message about use of browsers 'back button'
2013-08-06 22:23 mfaber Description Updated
2013-08-07 19:40 mfaber Note Added: 25940
2013-08-07 19:42 mfaber Status new => closed
2013-08-07 19:42 mfaber Resolution open => fixed