- Issue created by @andersmosshall
- 🇸🇪Sweden andersmosshall
A proposed solution patch to this issue. See Proposed resolution section.
- First commit to issue fork.
- Status changed to Needs work
about 1 year ago 6:39am 27 October 2023 This is a good solution. But I think we should first merge one other issue, before applying this patch. Specifically talking about ✨ Use Drupal.dialog call instead of jQuery dialog RTBC in that issue @DeaOm didn't just replace the jQuery dialog with Drupal dialog but also refactored the code to use vanilla JS, it would be good to fully move away from jQuery.
And when that is merged refactor your code to also use vanilla JS. And yeah I agree about adding more tests. So for now I'll switch this to needs work.
- 🇺🇸United States recrit
Using localStorage makes sense to me to improve the cross tab handling of this module. What still is not working for me is the "refresh_only" setting.
Scenario:
- Configuration: timeout = 60 seconds, disable "Enforce auto logout on admin pages" (this forces the "refresh only" mode on admin pages).
- Open the homepage in a new tab - this is a front end page.
- Open a node edit form in a new tab - this is an admin page and should be set up to be "refresh only".
- Stay on the node edit form tab and do not move your mouse for 1 - 2 minutes.
- BUG: You are logged out on the tab with the front end homepage. The front-end homepage tab has it's JS settings configured to NOT be "refresh only" so it eventually times out.Note with the 3395581 patch : If you are active on the node edit tab (move cursor, etc), then this works as expected and you remain logged in.
It seems like the new activity tracking (1.4+) does not properly consider the "refresh only" mode to keep you logged in.
- 🇺🇸United States recrit
follow up to my post #5:
I event attempted with activity on the node edit tab, and I still get logged out.- Configuration: timeout = 120 seconds, disable "Enforce auto logout on admin pages" (this forces the "refresh only" mode on admin pages).
- Open the homepage in a new tab - this is a front end page.
- Open a node edit form in a new tab - this is an admin page and should be set up to be "refresh only".
- Stay on the node edit form tab and do something on the page for 3 minutes - move your mouse around, click into fields, enter content in CKEditor, etc.
- BUG: You are logged out on the tab with the front end homepage. - 🇳🇱Netherlands arantxio Dordrecht
As there has been a update already and the patch made by @andersmosshall was not applying anymore I've rerolled the patch.
We would still have to wait for the other issue to land, but for now this will work for people who want to update to 1.5
- 🇳🇱Netherlands roaldnel
While working with the patch applied we have noticed the following:
- The popup does not appear on the admin theme.
- The problem also occurs if you work on 2 Chrome windows. As soon as you have 2 windows open, you will only receive a notification in on of the windows and not the other, and you are logged out in the background.
- 🇮🇳India gouthamraon
We are also facing the same issue after upgrading to 2.0.0
Any suggestions?
- 🇨🇦Canada joseph.olstad
Thanks for this, I've merged patch 7 into #3469258-24: Multiple dialogs open / have to click multiple times →
where I've added a description of the fix. - 🇧🇷Brazil charlliequadros
When the user does not select the 'Enforce auto logout on admin pages' option and leaves a window open on a non-configuration page, the system continues counting the time and logs out, even if the user is working on a configuration page in another window. To prevent this, I added this part to the code
if (localSettings.refresh_only) { // On pages where user shouldn't be logged out, don't set the timer. localStorage.setItem('autologout_page_activity', 'true'); t = setTimeout(keepAlive, localSettings.timeout);
which keeps the session active at all times while the user is on an administrative page.