Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It's possible to get into a situation where you can't save or discard your edits. It seems like you get "stuck".
Unfortunately, I'm not sure on the exact steps to reproduce, but I've found myself in this situation a few times so I thought I'd at least record of gif of what it looks like in the hopes that we can refine the steps to reproduce later.
Comment | File | Size | Author |
---|---|---|---|
#4 | 3090849-discard-4-interdiff.txt | 1.83 KB | tim.plunkett |
#4 | 3090849-discard-4.patch | 4.61 KB | tim.plunkett |
| |||
#3 | 3090849-discard-3.patch | 2.96 KB | tim.plunkett |
lbe--strange-loop.gif | 11.76 MB | balsama |
Comments
Comment #2
tim.plunkettI hit this just this morning before my demo. Thankfully it still works for the entity layout part...
The modal is new to me, I need to find when that changed. I think it might be related.
Comment #3
tim.plunkettThis was broken for discard and save by https://git.drupalcode.org/project/lb_everywhere/commit/98aa97a
It was fixed for save in https://git.drupalcode.org/project/lb_everywhere/commit/30bab79
This should fix it for discard.
Comment #4
tim.plunkettForgot to change the existing calls to exitLayoutMode
Comment #5
zrpnrI got into this loop by the following steps:
This keeps you in the modal as if nothing happened.
The patch in #4 fixes this loop.
However if you click "cancel" in step 4, you end up on the
admin/structure/lbeverywhere/[region]/discard-changes
and are not redirected away by clicking either the confirm or cancel buttons. This seems to be the same with or without the patch.
This should be
Drupal.AjaxCommands.exitLayoutMode()
, you only use prototype when declaring the function.Comment #6
zrpnrI did a little more digging and I was wrong about removing
prototype
, since you're calling it directly vs instantiating thatDrupal.AjaxCommands
function the 3 lines in #4 don't need to be changed.Comment #7
tim.plunkettAs this fixes this specific bug, and the cancel thing is pre-existing, I'm moving that to a follow-up: #3103645: Canceling the discard dialog takes you to a nonsensical page