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

Command icon 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

admirlju created an issue. See original summary.

admirlju’s picture

Status: Active » Needs work

admirlju’s picture

Status: Needs work » Needs review

I 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.

admirlju’s picture

So I did some extra tests, and it looks like this change also works with Drupal 9.2.

admirlju’s picture

Replaced jQuery event listener and dispatcher with vanilla JS, to make it consistent with changes in #3339695: Use Drupal.dialog call instead of jQuery dialog

the_g_bomb’s picture

With 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

the_g_bomb’s picture

Status: Needs review » Postponed

Postponing until the issue from above is reviewed and merged.

the_g_bomb’s picture

Status: Postponed » Closed (cannot reproduce)

I 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.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

the_g_bomb’s picture

Status: Closed (cannot reproduce) » Fixed

Changing the status to represent the actual status

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.