Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Drug Mile on November 25, 2021, 03:17:52 AM

Title: Logged out while writing post
Post by: Drug Mile on November 25, 2021, 03:17:52 AM
SMF2.0.18, but this problem was common to any previous versions, and also different themes.

If I am writing a reply for too long, I am being logged out without noticing it. So, when my reply is done and I try to post it, I am redirected to login screen. After I login, my post is gone and I am now in the "start new topic" page.

Is this common behaviour of all SMF installations, or a bug I need to solve?
Title: Re: Logged out while writing post
Post by: GL700Wing on November 25, 2021, 03:55:09 AM
If you nominate a login time of anything other than 'Forever' you will be logged out after the selected period of time has elapsed even if you are in the middle of typing something.

Annoying but you can avoid this by choosing a longer (or Forever) login period and/or by implementing a drafts system that auto saves posts that are being typed every so often (at least then if you get logged out unexpectedly a draft copy of a recent version your new post will have been saved) ...
Title: Re: Logged out while writing post
Post by: Drug Mile on November 29, 2021, 06:07:44 AM
Drafts system will not, if I understand, save a copy automatically, user have to do it manually. If he didn't, his work is lost. It might be an hour or more of his work. Logout comes without notice, so sure, that must be annoying.
Title: Re: Logged out while writing post
Post by: Kindred on November 29, 2021, 07:31:24 AM
It's not a bug.  It's the nature of a timed session.
Title: Re: Logged out while writing post
Post by: Sesquipedalian on November 29, 2021, 11:38:57 AM
Quote from: Drug Mile on November 29, 2021, 06:07:44 AMDrafts system will not, if I understand, save a copy automatically, user have to do it manually.

This is incorrect. By default the drafts system automatically saves a draft every 60 seconds. The admin can change the frequency or disable auto-saving entirely using the settings in Administration Center > Posts and Topics > Drafts.
Title: Re: Logged out while writing post
Post by: Sir Osis of Liver on November 29, 2021, 11:53:28 AM
Um, there's a drafts feature in 2.0.18?
Title: Re: Logged out while writing post
Post by: Sesquipedalian on November 29, 2021, 12:18:48 PM
Oops. I thought I was posting in the 2.1 support board. Never mind. :)
Title: Re: Logged out while writing post
Post by: Sir Osis of Liver on November 29, 2021, 08:55:14 PM
Been there, done that, bought the tee shirt. :P
Title: Re: Logged out while writing post
Post by: sam666 on November 30, 2021, 07:42:16 AM
There is a tip/trick to auto-renew a session, which may be of interest.
https://www.simplemachines.org/community/index.php?topic=545238.0
Title: Re: Logged out while writing post
Post by: Dave J on December 01, 2021, 10:49:11 AM
If you are using 'Drafts 1.1.2' then you can set drafts to save automatically with an adjustable time scale.

Go into Admin, Forum, Post and Topics, and you'll see the settings.
Title: Re: Logged out while writing post
Post by: Drug Mile on December 04, 2021, 05:56:45 AM
Quote from: Dave J on December 01, 2021, 10:49:11 AMIf you are using 'Drafts 1.1.2' then you can set drafts to save automatically with an adjustable time scale.

Using latest version (https://custom.simplemachines.org/index.php?mod=1264) that apears to be 2.2 and I don't have those settings in Admin CP. Should I downgrade to earlier version?

Back on topic, here is what still bothers me. If I come logged out from my forum and click to see who is online, I am first taken to login page (guests can not see who is online). After I login, I am redirected to "Who is online" page, right where I wanted to go.

When I want to make a post, after filling the form with long text, I am also taken to login page. After I login, my form is cleared, and instead of posting a reply (action=post;topic=xxx), I am on a "New post" page (action=post;board=xxx). I guess when session expires, some data can not be preserved, but please confirm me that this is expected behaviour.

I find this to be a problem of using forums in general. Other technologies don't have such limitation, user's work is better preserved. That is why I am looking for some workaround.
Title: Re: Logged out while writing post
Post by: Kindred on December 04, 2021, 09:11:08 AM
Ah, that's very different from what you first said...

And, no, there is no really good way to "work around" that.
Title: Re: Logged out while writing post
Post by: shadav on December 04, 2021, 12:57:38 PM
there is this mod but I haven't noticed that it actually works
https://custom.simplemachines.org/index.php?mod=3256
then again I don't tend to use the quickreply
and I'm not sure how it would handle being logged out
Title: Re: Logged out while writing post
Post by: Kindred on December 04, 2021, 03:24:13 PM
Shadav,  that's not what the OP is talking about anymore
Title: Re: Logged out while writing post
Post by: GL700Wing on December 04, 2021, 04:59:00 PM
Quote from: Dave J on December 01, 2021, 10:49:11 AMIf you are using 'Drafts 1.1.2' then you can set drafts to save automatically with an adjustable time scale.

Go into Admin, Forum, Post and Topics, and you'll see the settings.
@Dave J  - I think you're referring to a different 'Drafts' mod (ie, the one that was developed by Arantor but which is no longer available - https://www.simplemachines.org/community/index.php?topic=392598.0).
Title: Re: Logged out while writing post
Post by: shadav on December 04, 2021, 06:36:01 PM
Quote from: Kindred on December 04, 2021, 03:24:13 PMShadav,  that's not what the OP is talking about anymore
supposedly that mod though saves the text, but it says if you crash or in between browsing pages on current topic, so it may work for logging in...not sure...
Title: Re: Logged out while writing post
Post by: Dave J on December 05, 2021, 12:36:50 AM
Quote from: GL700Wing on December 04, 2021, 04:59:00 PM
Quote from: Dave J on December 01, 2021, 10:49:11 AMIf you are using 'Drafts 1.1.2' then you can set drafts to save automatically with an adjustable time scale.

Go into Admin, Forum, Post and Topics, and you'll see the settings.
@Dave J  - I think you're referring to a different 'Drafts' mod (ie, the one that was developed by Arantor but which is no longer available - https://www.simplemachines.org/community/index.php?topic=392598.0).

Yes you're right. I have the old version installed on my test site, which is still viable as it's only just been started from scratch again, but on the live site I have 2.2 installed. The 1.1.2 version needs to be installed emulating 2.0.1.

If anyone wants the old version let me know.
Title: Re: Logged out while writing post
Post by: Illori on December 05, 2021, 05:49:44 AM
Quote from: Dave J on December 05, 2021, 12:36:50 AMIf anyone wants the old version let me know.

unless it has a valid license that allows you to redistribute it you are not allowed to provide the mod to anyone.
Title: Re: Logged out while writing post
Post by: Dave J on December 05, 2021, 11:54:25 AM
Quote from: Illori on December 05, 2021, 05:49:44 AM
Quote from: Dave J on December 05, 2021, 12:36:50 AMIf anyone wants the old version let me know.

unless it has a valid license that allows you to redistribute it you are not allowed to provide the mod to anyone.

Good point
Title: Re: Logged out while writing post
Post by: Steve on December 05, 2021, 08:04:08 PM
To get back to the OP's question ... Drug Mile, where are we on this?