View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
05793 | Bug reports | Survey taking | public | 2012-02-09 17:30 | 2012-03-14 21:08 |
Reporter | DenisChenu | Assigned To | TMSWhite | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 1.92RC3 | ||||
Target Version | 1.92RC5 | Fixed in Version | 1.92RC5 | ||
Summary | 05793: 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 | ||||
Additional Information | I think it's really a bad idea to try disabling Back button ... But if it put in LS core, the function should mus be replaced in template.js. 1.91 is very best in this ;). | ||||
Tags | No tags attached. | ||||
Bug heat | 4 | ||||
Complete LimeSurvey version number (& build) | 12425 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Firefox 10.0 | ||||
Database type & version | not relevant | ||||
Server OS (if known) | not relevant | ||||
Webserver software & version (if known) | not relevant | ||||
PHP Version | not relevant | ||||
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). |
|
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? |
|
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. |
|
Fixed with patch https://github.com/LimeSurvey/LimeSurvey/commit/4850c3d26f79738fdb1ccfc9e25ac1be4d7b657b |
|
1.92RC5 release |
|
LimeSurvey: Yii a4d8c71d 2012-02-22 14:59:27 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 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 |
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 |