- Issue created by @berliner
- Status changed to Needs review
almost 2 years ago 10:58pm 16 February 2023 - π©πͺGermany berliner
That was too quick and not properly tested. This one is fixing the issue for me.
- π©πͺGermany Anybody Porta Westfalica
Confirming this issue. We're running into it when changing layout paragraphs sometimes.
This was also confirmed in π Problem with form submit button's not working after an ajax call would refresh the form-id Closed: duplicate (was closed as duplicate of this).
- π¨πSwitzerland saschaeggi Zurich
@Anybody can you rest if the patch fixes the issue for you?
- π©πͺGermany Anybody Porta Westfalica
@saschaeggi the problem is, that the issue only appears from time to time, so there's no reliable way to test it. Even if it works, it doesn't mean it does in general. So I think we need to ensure that in theory.
- π©πͺGermany berliner
@Anybody The steps to reproduce from the issue description don't help you isolate the problem? It took me a while, but in the end I was able to reliably reproduce this issue in my setup.
- π¦πΉAustria hudri Austria
This is a little bit similar to issue 3387363 π z-index problem with media library widget Closed: works as designed : Ajax requests can break if the dependency declaration of libs is missing or conflicting (e.g. through duplication). In this case there is a conditional (Ajax), but undefined dependency of
gin/edit_form
ondrupal.ajax
.In response to #7:
The problem is reproduceable, but you have to check if a library is included on page load, or added later through an Ajax request.I think berliner's approach is a quite clever approach, which avoids unconditionally adding the drupal.ajax library on all forms.
OTOH, I wonder if the change of the button's id is really necessary? Doing a code search on the Gin folder, I can't see
--gin-edit-form
being used anywhere (except being created initially). Maybe we can refactor edit_form.js instead and remove the manipulation of the ID. - Status changed to Needs work
about 1 year ago 6:20pm 28 September 2023 - πΊπΈUnited States sim_1
Patch #3 did not work for me. However patch #23 from the duplicate issue π Problem with form submit button's not working after an ajax call would refresh the form-id Closed: duplicate did work for me. Using that instead.
- π©πͺGermany berliner
Rerolled #3 for rc9.
I would be in favour of not changing the ids in the first place though, just as hudri suggested. Removing unnecessary complexity is always preferable.
- Assigned to Grevil
- π©πͺGermany Grevil
Going to move using an issue fork instead of patches. Still unsure, which patch to use as a foundation. I'll start with the original from @berliner.
- Merge request !381Issue #3342513 by berliner: Ajax behaviour on entity edit form action buttons can break β (Open) created by Grevil
- Issue was unassigned.
- Status changed to Postponed: needs info
11 months ago 12:14pm 5 February 2024 - π©πͺGermany Grevil
The patch by @berliner (now applied to the current MR) fixes the issue described in "Steps to reproduce"!! Unfortunately, the issue I had locally, has not much to-do with the AJAX integration (I thought it would, but instead it seems to be caused by custom client code).
Nevertheless, we should get this issue fixed.
@sim_1, what exactly did not work for you? Were you testing the patch through the "Steps to reproduce"? Or do you have another example where the current Patch / MR doesn't fix the issue? Please give us more information.
LGTM! But setting to "postponed" regarding #10.
- πΊπΈUnited States sim_1
Ok, i'm doing my best to remember... I wish I'd written down more details when it was fresh. I wasn't following the reproduction steps exactly. I was also working with custom client code:
- a custom module
- in the .module file there is a form alter that adds two widgets, and then attaches an ajax callback to each.
- admin theme is ginI believe then I was getting ajax errors in the console when trying to use the submit buttons. It wasn't all the time, only after ajax had been triggered on the form by using either of the fields with callbacks. I can try to go back and reproduce. But I am guessing that all I meant by the patch not working is that it didn't fix my particular issue (not the exact repo steps from this description), but the other patch did.
- Status changed to Needs review
11 months ago 8:00am 6 February 2024 - π©πͺGermany Grevil
Thanks for the clarification @sim_1! This definitely sounds like the patch doesn't work as intended, if you got the time, feel free to reproduce it using the current MR! Otherwise, we should check both patches and see if we can find a middle ground between them. :)
- π΅πΉPortugal rfmarcelino
The patch in #11 had a typo where sticky was called out of scope.
Here's the fixed patch.I tried to apply #12 instead and I'm unable to submit the form after ajax runs.
With this patch, it works. Still not working for me. Changing something in layout_paragraphs still causes this issue randomly.
Created a Quickfix for this, using position: sticky and flexbox to have basically the same experience (while it doesn't look that perfect, but it works).
- π©πͺGermany berliner
I get the feeling that this get's a bit out of hand here.
Those last patches do not seem to address the original issue about the changed button ids and the outdated references in the ajax subsystem. #12 should fix the issue as demonstrated by the "steps to reproduce", so this should be reviewed and tested. The other patches seem to be about different issues. Maybe it would be better to create a new issue for those with sufficient information to reliably reproduce the problems and then fixing them. - Status changed to Closed: outdated
6 months ago 7:41pm 9 June 2024 - π¨πSwitzerland saschaeggi Zurich
This will be fixed with β¨ Move Action buttons to sticky header Fixed