View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
05793Bug reportsSurvey takingpublic2012-03-14 21:08
ReporterDenisChenu Assigned ToTMSWhite  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.92RC3 
Target Version1.92RC5Fixed in Version1.92RC5 
Summary05793: Javascript function for "please use navigation button" don't work
Description

When you test survey in group by group, if you reload the page, you have an alert: "Please use the LimeSurvey navigation buttons or index. It appears you attempted to use the browser back button to re-submit a page.", when you press F5 or the refresh button.

There can be reason you can update the page (clean the cache for example :).

I think this script are here to deactivate the back button of the browser : but he don't work : you can go back without alert.

Steps To Reproduce

Launch a survey, go to page 3 or 3 ( for secons page , back button work like a charm):

Relaod the page: alert
Back button : expired document.

Additional Information

I think it's really a bad idea to try disabling Back button ...
( see The Top Ten Web Design Mistakes of 1999 : http://www.useit.com/alertbox/990530.html ).

But if it put in LS core, the function should mus be replaced in template.js.

1.91 is very best in this ;).

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)12425
I will donate to the project if issue is resolvedNo
BrowserFirefox 10.0
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

TMSWhite

TMSWhite

2012-02-09 18:50

reporter   ~17340

This is a session management issue to avoid submitting the same page twice, or clicking the browser back button and then re-submitting from it. 1.92 creates a hidden POSTkey value. If the session value and the value on the generated page don't match, then you get the error you're seeing.

Yii will have a different way of managing sessions.

In general, though, I need to make sure that EM doesn't call NavigateForwards() if you click next after having used your browser back button. You'd get the wrong results. EM caches all the information it needs about the current set of relevant questions for performance and data integrity purposes. If you use the browser back button, you invalidate it's ability to do those checks.

Going back is OK, since I don't validate data going backwards - only going forwards.

FYI, there are plenty of frameworks that disable (or don't use) the back button. Disabling it isn't always a mistake (anything Flash-based, for example).

c_schmitz

c_schmitz

2012-02-12 12:28

administrator   ~17380

I don't think we really need a POSTkey value in the frontend, as I consider the security risks (session CRF) be very low with something as mundane as survey.

I don'T understand why using the forward button (an thus submitting the same values again) would serve you wrong results?

TMSWhite

TMSWhite

2012-02-12 15:49

reporter   ~17383

OK, there is probably a way around this. I'd just need to see whether things works as expected if I use "JumpTo" a prior page value (to get the session state you would have had on a prior page) followed by NavigateForwards(). We'd also need stronger checking of the page # from which the person is submitting next.

TMSWhite

TMSWhite

2012-02-22 23:47

reporter   ~17573

Fixed with patch https://github.com/LimeSurvey/LimeSurvey/commit/4850c3d26f79738fdb1ccfc9e25ac1be4d7b657b

c_schmitz

c_schmitz

2012-02-26 14:21

administrator   ~17648

1.92RC5 release

Related Changesets

LimeSurvey: Yii a4d8c71d

2012-02-22 14:59:27

TMSWhite

Details Diff
Fixed issue 05793: Javascript function for "please use navigation button" don't work
Dev it is no OK to use F5 to reload the current page - F5 will not save data, nor show any error messages (so any data entered on the page is lost)
Dev All tested browsers (Firefox, Chrome, Internet Explorer) were expiring older pages. So, given that, and the fact that users should use the Previous button if they want to go backwards, did not attempt to support use of browser back button in lieu of Previous button.
Affected Issues
05793
mod - application/helpers/SurveyRuntimeHelper.php Diff File

LimeSurvey: Yii 45d50571

2012-02-22 20:19:38

TMSWhite

Details Diff
Fixed issue 05793: Javascript function for "please use navigation button" don't work
Dev Further fix - reloading page (e.g. via F5) now works for all pages, including first and last pages
Affected Issues
05793
mod - application/helpers/SurveyRuntimeHelper.php Diff File
mod - application/helpers/frontend_helper.php Diff File

Issue History

Date Modified Username Field Change
2012-02-09 17:30 DenisChenu New Issue
2012-02-09 18:50 TMSWhite Note Added: 17340
2012-02-12 12:28 c_schmitz Note Added: 17380
2012-02-12 15:49 TMSWhite Note Added: 17383
2012-02-17 18:44 TMSWhite Target Version => 1.92RC5
2012-02-20 03:25 TMSWhite Assigned To => TMSWhite
2012-02-20 03:25 TMSWhite Status new => assigned
2012-02-22 23:47 TMSWhite Note Added: 17573
2012-02-22 23:47 TMSWhite Status assigned => resolved
2012-02-22 23:47 TMSWhite Fixed in Version => 1.92RC5
2012-02-22 23:47 TMSWhite Resolution open => fixed
2012-02-26 14:21 c_schmitz Note Added: 17648
2012-02-26 14:21 c_schmitz Status resolved => closed
2012-03-14 21:08 TMSWhite Changeset attached => Import 2012-03-09 13:30:34 Yii 45d50571
2012-03-14 21:08 TMSWhite Changeset attached => Import 2012-03-09 13:30:34 Yii a4d8c71d