The scenario is from one of my customers. They had worked on an Newsarticle for about 2 hours, within these time the session expired. After they hit the save button they ended up with the login screen, after login the changes where gone.
Step to reproduce:
system/config/localconfig.php the Value for $GLOBALS['TL_CONFIG']['sessionTimeout'] to 30 Seconds (for test case only)Problem could be solved in differend Ways:
Imho a combination of the first 2 approaches would be ideal.
A heartbeat is the most convenient solution as it prevents logout, but it fails when network connection is interrupted for a long enough time (wifi outage, device going to sleep, ...). In that case the first approach would serve as a fallback.
As discussed in Mumble on March 7th, we could implement an XHR heartbeat in a first step. In the long run, we could store the changes in the local storage of the browser on submit, so we can restore them in case the session has expired or the server throws an error 500.
Most helpful comment
As discussed in Mumble on March 7th, we could implement an XHR heartbeat in a first step. In the long run, we could store the changes in the local storage of the browser on submit, so we can restore them in case the session has expired or the server throws an error 500.