Problem/Motivation
I don't understand why this module was ever accepted to be D10 compatible. I set the timeout to 70 seconds and left padding at 20 seconds. Login as any user, after 70 seconds the dialog shows up, and I click the button to extend the time after about 30 seconds a new dialog opens for less than a second and instantly logs me out.
I see that there was a D10 compatibility issue that only fixed depreciation problems, but there was not much testing done.
Thanks to the recent fixes added to the dev branch at least the second dialog shows up, without them the module is even more broken.
Steps to reproduce
- Install the module and set timeout to 70 seconds
- Go to any page
- After 70 seconds the dialog shows up, click the button to stay logged in
- At this point after some 30 seconds or so, the bug happens, and you'll get logged out
Issue fork autologout-3390135
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
admirlju commentedComment #4
admirlju commentedI think I figured it out and from quick testing, the fix in the issue fork should also work with Drupal 9.5 but please this needs a lot more testing, and as I mentioned in some other issue the whole JS file needs refactoring.
Comment #5
admirlju commentedSo I did some extra tests, and it looks like this change also works with Drupal 9.2.
Comment #6
admirlju commentedReplaced jQuery event listener and dispatcher with vanilla JS, to make it consistent with changes in #3339695: Use Drupal.dialog call instead of jQuery dialog
Comment #7
the_g_bomb commentedWith once API from #3339695: Use Drupal.dialog call instead of jQuery dialog, the scoping issue may no longer exist. At the very least this will have to have a new patch on top of #3339695.
I suspect there would still be some timer accumulation which will require a fix: clearTimeout() in init() and a cleanup of the Event listeners to prevent memory leak
Comment #8
the_g_bomb commentedPostponing until the issue from above is reviewed and merged.
Comment #9
the_g_bomb commentedI have tested this with the latest dev branch and suspect the other work done has solved this. Please feel free to reopen and update the steps to reproduce if you are still having problems.
Comment #11
the_g_bomb commentedChanging the status to represent the actual status