cancel
Showing results for 
Search instead for 
Did you mean: 

Login timeout problem - data lost

Community Veteran
Posts: 38,241
Thanks: 933
Fixes: 54
Registered: 15-06-2007

Login timeout problem - data lost

As I use the standard 60 minute login at present (don't ask why - but if you are interested have a look at my thread regarding "Show unread posts since last visit" ) I have found a problem.
If you want to post and while writing it the 60 minute lapses nothing happens until you try to post then it tells you that you can't unless you are logged in. If then you login as requested everything you have written has vanished into a blackhole.
This also happens if you are trying to send a PM.
Surely the system should be that the login screen takes you back to where you were with everything intact.
6 REPLIES
MikeWhitehead
Grafter
Posts: 748
Registered: 19-08-2007

Re: Login timeout problem - data lost

The problem is that posts (mid-writing) aren't saved on the server anywhere, and are only transferred to the server once the Post button is hit, as long as the required conditions (i.e. logged in) are met.
Only possible "fix" for this I can think of off-hand is to add a countdown timer somewhere in the navigation that tells you how long you are logged in for (although trying to set up and maintain something like this could run into some problems).
On the other hand, something may be hacked up to work in the same way as the "someone has posted before you, read it first" style message that you get if someone posts before you do on a thread. Don't think you would lose your message that way.
Community Gaffer
Community Gaffer
Posts: 4,899
Thanks: 179
Fixes: 4
Registered: 04-04-2007

Re: Login timeout problem - data lost

AJAX (well, possibly with XML and therefore really AJAX...) could allow us to save out drafts of posts I guess.  We'd need to add that functionality.
I wonder if there is an SMF plugin to do it....
MikeWhitehead
Grafter
Posts: 748
Registered: 19-08-2007

Re: Login timeout problem - data lost

[me=MikeWhitehead]hides from the mention of the plugin[/me]
I'm sure it's quite easily done. I mean, once you are sent to the login screen after you try to post your message, the contents of the message is still in $_POST['message'] and it can be kept in another variable if needed. However, once you log back in via the login box that is displayed, it doesn't take you back to the thread that you were on but rather takes you to create a new topic.
An "easy" way would be to check for the existance of the session control cookie (think its maybe pnCommunitySite on here?). If the cookie doesn't exist, then they aren't logged in.
If cookies are disabled, however, then this wouldn't be a viable option and the SMF session control would need to be used.
VileReynard
Seasoned Pro
Posts: 10,579
Thanks: 190
Fixes: 9
Registered: 01-09-2007

The following error or errors occurred while posting this message:

I would put the error here but posting a new topic wipes it from the copy/paste buffer.
Basically, If I'm logged in and I post a reply, but I take long enough to type the message that my login time expires, it loses my message, tells me to login and type everything all over again.
So I don't bother.

MikeWhitehead
Grafter
Posts: 748
Registered: 19-08-2007

Re: The following error or errors occurred while posting this message:

Already noted here.
N/A

Re: Login timeout problem - data lost

Not a bug, so moved to 'suggestions'.