View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
08477Bug reportsSurvey takingpublic2014-01-25 17:25
Reporterabezverkhyy Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.50.x 
Fixed in Version2.05+ 
Summary08477: regression when session expires: in 1.92 LS showed a dedicated message, now it silently returns to the first page
Description

Regression when session expires: in 1.92 LS showed a dedicated message, now it silently returns to the first page. Therefore the user isn't informed that he potentially lost data he typed in.

Steps To Reproduce

Make a survey with several steps.
Go to step 2.
Let the session expire.
Click on next.
LS will silently go to step 1 and data may be lost.

Additional Information

The code handling the session expiration message has been commented out in application/controllers/survey/index.php line 147 when LS migrated to Yii.

I don't know if Yii supports detection of lost session. An alternative solution can be to add a meta refresh tag with a timeout equal to the session max lifetime and destination equal to an url which displays the lost session message.

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)c51d934
I will donate to the project if issue is resolvedNo
Browser
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2013-12-21 19:23

developer   ~27689

Hi,

Maybe we can do something like this:
Yii::app()->clientScript->registerScript('sessionexpires',"alert('We are sorry but your session has expired.\nEither you have been inactive for too long, you have cookies disabled for your browser, or there were problems with your connection.\nYou start this survey at the first step.'",CClientScript::POS_READY);

I don't like alert, surely it's better if we have already a alert replacement.

Maybe time to have a 'alert' replacement (jquery dialog for example).

Denis

abezverkhyy

abezverkhyy

2014-01-16 17:58

reporter   ~27919

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

abezverkhyy

abezverkhyy

2014-01-16 18:00

reporter   ~27920

I fixed it with a JS timer and redirection, when the user is redirected to ?sessionExpired the old error message is displayed. What do you think about this solution ?

DenisChenu

DenisChenu

2014-01-16 18:42

developer   ~27923

Sorry don't found this one.

I think redirectiong must be a template issue only.

If i do it , i do same system than token mismatch.
https://github.com/LimeSurvey/LimeSurvey/blob/master/application/controllers/survey/index.php#L84

And here you are not sure for ?/& need. Create the url with Yii seem better.

I think show a clean message in HTML with a link to restart the same survey (but WITHHOUT token if exist) is clean enough.

c_schmitz

c_schmitz

2014-01-17 08:04

administrator   ~27929

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

c_schmitz

c_schmitz

2014-01-25 17:25

administrator   ~28169

2.05+ Build 140125 released

Related Changesets

LimeSurvey: master 22b0ced5

2014-01-16 16:56:09

abezverkhyy

Details Diff
Fixed issue 08477: a clear error message is now displayed when a session expires Affected Issues
08477
mod - application/controllers/survey/index.php Diff File

LimeSurvey: master f5b5a018

2014-01-17 07:05:02

c_schmitz

Details Diff
Fixed issue 08477: a clear error message is now displayed when a session expires
Dev Also reverted commit 22b0ced540286ea6c0d796ea64ef8009007c400e
Affected Issues
08477
mod - application/controllers/survey/index.php Diff File

Issue History

Date Modified Username Field Change
2013-12-19 18:38 abezverkhyy New Issue
2013-12-21 19:23 DenisChenu Note Added: 27689
2014-01-14 12:07 c_schmitz Assigned To => c_schmitz
2014-01-14 12:07 c_schmitz Status new => assigned
2014-01-16 17:58 abezverkhyy Changeset attached => LimeSurvey master 22b0ced5
2014-01-16 17:58 abezverkhyy Note Added: 27919
2014-01-16 17:58 abezverkhyy Assigned To c_schmitz => abezverkhyy
2014-01-16 17:58 abezverkhyy Resolution open => fixed
2014-01-16 18:00 abezverkhyy Note Added: 27920
2014-01-16 18:01 abezverkhyy Status assigned => resolved
2014-01-16 18:42 DenisChenu Note Added: 27923
2014-01-17 08:04 c_schmitz Changeset attached => LimeSurvey master f5b5a018
2014-01-17 08:04 c_schmitz Note Added: 27929
2014-01-17 08:04 c_schmitz Assigned To abezverkhyy => c_schmitz
2014-01-25 17:25 c_schmitz Note Added: 28169
2014-01-25 17:25 c_schmitz Status resolved => closed
2014-01-25 17:25 c_schmitz Fixed in Version => 2.05+