Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Storebror on August 23, 2023, 03:39:15 AM

Title: Total time online resets itself when using multiple tabs
Post by: Storebror on August 23, 2023, 03:39:15 AM
Dear fellow SMF users,

Today a user on our forums made us aware of a glitch that would reset the "Total time online" to a previous value.
I've been trying a couple of things and this is what I found:
The issue gets triggered when you use multiple tabs to browse the same forum.
Let's say you log in on tab "A" and browse the forum there, e.g. using the "Show unread posts since last visit" link, and your online time is 1 minute.
Now you find a thread that you would want to read on a separate tab, so you open it up on a separate tab "B".
You keep reading the thread for 10 minutes and then you click on some other thread in tab "B".
Result: Your online time is 11 minutes as expected.
Now you switch back to tab "A" and click on the "Show unread posts since last visit" link again.
Surprise: Your online time is still 1 minute!
You switch back to tab "B". Surprise: Your online time has been reset to 1 minute!

This is reproducible and it's not mod related (I've tried on a clean install).
Anyone else witnessed the same and maybe knows a way to circumvent it?

Cheers!
Mike
Title: Re: Total time online resets itself when using multiple tabs
Post by: Kindred on August 23, 2023, 07:11:04 AM
This is NAB.
The online time is per session. Each tab has a different session.
Therefore each tab has a different time count.

The time doesn't RESET, it just calculates in that tab.

If you log out or close all tabs and come back - is the OVERALL time NOW correct?  (Bet it is)
Title: Re: Total time online resets itself when using multiple tabs
Post by: Storebror on August 23, 2023, 10:45:41 AM
Quote from: Kindred on August 23, 2023, 07:11:04 AMThis is NAB.
I hear you, but tbh I disagree.

Quote from: Kindred on August 23, 2023, 07:11:04 AMThe online time is per session. Each tab has a different session.
Therefore each tab has a different time count.

The time doesn't RESET, it just calculates in that tab.
If it'd be like that, everything was fine.
But it isn't.
I explain again:
Tab A = 1 minute online time.
Tab B = 1 minute online time. Wait 10 minutes...: 11 minutes online time.
Switch back to Tab A = 1 minute online time (fits what you say).
Switch back to Tab B = 1 minute online time!?!?!? That doesn't make sense. Tab B's online time resets once there was activity in Tab A again. This does not match your suspicion that tabs would use different sessions with different times. Apparently they don't. Tab A's online time overrides Tab B once you toggle B->A->B.

Quote from: Kindred on August 23, 2023, 07:11:04 AMIf you log out or close all tabs and come back - is the OVERALL time NOW correct?  (Bet it is)
No it's NOT.
Close the browser, reboot the PC, log out and back in -> Either case, you always get the lower online time from Tab A.

To me this is a glitch if not a bug.

Cheers!
Mike
Title: Re: Total time online resets itself when using multiple tabs
Post by: Storebror on September 20, 2023, 08:39:14 AM
*bump*

Any idea how to fix this?
I'm not kidding you, this issue is for real and there's no way for a user to work his way around it currently.

Cheers!
Mike
Title: Re: Total time online resets itself when using multiple tabs
Post by: Storebror on October 04, 2023, 08:57:42 AM
I take it that nobody knows a fix to this issue and that it's deemed just too unimportant to take care of?

Cheers!
Mike
Title: Re: Total time online resets itself when using multiple tabs
Post by: Kindred on October 04, 2023, 11:07:08 AM
it is, in the scheme of things, very minor...   it may be addressed in the future, but it's not a Priority/must fix item.
Title: Re: Total time online resets itself when using multiple tabs
Post by: Steve on October 04, 2023, 01:48:48 PM
Quote from: Storebror on August 23, 2023, 10:45:41 AMI explain again:
Tab A = 1 minute online time.
Tab B = 1 minute online time. Wait 10 minutes...: 11 minutes online time.
Switch back to Tab A = 1 minute online time (fits what you say).
Switch back to Tab B = 1 minute online time!?!?!? That doesn't make sense.
To me, it makes perfect sense, depending on the browser. When you switch back to tab B, you've essentially reset the time you've been in that tab so it should now read 1 minute.

To be honest, I don't see a problem here. Keep in mind though, I'm not a coder and could be wrong ... I was once ...  :P