- Issue created by @alfaguru
- Status changed to RTBC
about 2 years ago 3:20pm 13 February 2023 The last submitted patch, 2: use_drupal_dialog_api-3339695-2.patch, failed testing. View results โ
- Status changed to Needs work
almost 2 years ago 11:02am 22 May 2023 - ๐ฌ๐งUnited Kingdom kiwimind
Have tested the patch and it appears to solve one of the issues that I raised on https://www.drupal.org/project/autologout/issues/3361785 ๐ Inconsistent modal behaviour Needs review , so I'm happy that the code does what it's supposed to.
Prior to installing this patch, not only was it using jQuery, but it seemed to be inconsistent with the regularity of displaying the modal. Now it's showing every time.
Going to need to sort out the failing tests though.
- First commit to issue fork.
- Merge request !39Issue #3339695: Use Drupal.dialog call instead of jQuery dialog โ (Open) created by deaom
- last update
over 1 year ago 15 pass, 7 fail - Status changed to Needs review
over 1 year ago 10:37am 20 September 2023 - ๐ธ๐ฎSlovenia deaom
Added the patch to issue fork for easier maintaining. The tests are failing because of the core migration issue ๐ฑ [META] Serialization issues in Migration tests Active , but the code provided does seem to work, but setting the status to needs review, so somebody else can also again re-test and confirm it's working as expected.
- First commit to issue fork.
Rebased the MR, tests are passing, testing by hand the modal also works fine.
While the patch is the same as the issue fork, I'll hide the file since DrupalCI tests are deprecated, and without the tests fix they will never pass, if you need a patch you can use plain diff or generate a patch file using GitLab.
Setting the issue to RTBC.
- Status changed to RTBC
over 1 year ago 6:03am 26 September 2023 - Status changed to Needs review
over 1 year ago 11:49am 28 September 2023 - ๐ธ๐ฎSlovenia deaom
Changed as much of JQuery to plain JS as I could, also removed the duplicated dialogs appearing when clicking on "Yes" button. There could be an issue of logging out after 10s after first "Yes" in D10, which is covered in ๐ Drupal 10 second dialog logout Needs review . Needs manual testing to confirm everything is working as expected, the automated test are passing.
- Status changed to RTBC
over 1 year ago 1:10pm 28 September 2023 Local and gitlabCI tests are passing, testing by hand also works correctly. Just in case locally merged ๐ Drupal 10 second dialog logout Needs review and that fixed the second dialog instantly closing. With this fix, there is no need for ๐ Multiple dialogs open Postponed . I think this can be merged.
- ๐บ๐ธUnited States jrglasgow Idaho
The fork appears to have merge conflicts, please fix and I will merge them in.
david.muffley โ made their first commit to this issueโs fork.
david.muffley โ changed the visibility of the branch 8.x-1.x to hidden.
I am testing this patch with version 2.0.0 and it appears that these changes:
document.dispatchEvent(new Event('preventAutologout'));
are not properly triggering the 'preventAutologout' event. I'm being logged out despite 'mousemove' events triggering.
- Status changed to Needs work
6 months ago 10:20pm 6 September 2024 - Status changed to Needs review
6 months ago 3:13pm 19 September 2024 I've updated the branch to fix the JS scope and event issues I found.
- ๐บ๐ธUnited States TomTech
tomtech โ changed the visibility of the branch 3339695-use-drupal.dialog-call to hidden.
- ๐บ๐ธUnited States TomTech
tomtech โ changed the visibility of the branch 3339695-use-drupal.dialog-call to active.
- ๐บ๐ธUnited States TomTech
tomtech โ changed the visibility of the branch 3339695-use-drupal.dialog-call to hidden.
- ๐บ๐ธUnited States TomTech
Hi all,
The MR resolved most of the issues I was also encountering, but the attachBehaviors was firing multiple times. This caused init() to be invoked multiple times stacked. While clicking "Yes" would dismiss the dialog, the subsequent init() calls would still invoke logout shortly thereafter.
The code tries to prevent this by checking if the context is "document", but there can still be multiple attach calls with document as the context.
I've added a commit that uses drupal once, so that the behavior is only attached once, which seems to resolve this issue.
I also add the new classes property, so this works with D10.3.
Lastly, I created a new fork that targets the 2.x branch, given that is the latest version.