- Issue created by @lilune
- πΊπΈUnited States DamienMcKenna NH, USA
I've ran into some oddities with the module, I think this was one of them.
- π΅πΉPortugal lolgm
I have the same problem.
After investigating a little, I noticed that when the validation messages for the mandatory fields of the form are shown, all open dialogs (level 1 and level 2) are replaced with the form that gave an error, which means that all open dialogs have the same content.
It seems to me that this problem is happening due to some problem updating the dialogs/forms with AJAX.
However, I was unable to identify the origin of this problem. - π³π±Netherlands erwinvb
I'm having the same issue with nested paragraphs.
For example our paragraphs are filled with the content below:
- Text
- Media
- Collapse (content with paragraphs)
- Text
- Media
Steps to reproduce:
- Edit collapse
- Opens first dialog with layout paragraphs
- Edit text inside the collapse
- Opens second dialog on top of the first one with the text editor
- Try to submit without a body (body is required)
- Will show a validation error after Drupal updates the modals via Ajax
- Result: Modal 1 and Modal 2 contains the form of the nested text paragraph with the validation error
- After submitting Modal 2 with the required body, it can not reference to modal 1 since this modal/form is also replaced with the form with validation errors
- π¦πΉAustria hudri Austria
@erwinvb For media entities, use the patch from https://www.drupal.org/project/drupal/issues/3345064 π Media library field_widget_id is not unique enough Needs work
- π¬π§United Kingdom johntarling
Hit this issue too when creating a tabbed content component in D10.2 with Layout paragraphs 2.04.
Currently experiencing the same issue on Drupal 10.2.4 and layout_paragraphs 2.0.4
- Status changed to Needs review
8 months ago 8:24pm 21 March 2024 - last update
8 months ago 55 pass - π²π©Moldova marjina-constantin
Here is a patch with a fix.
As @erwinvb mentioned, the problem is that nested dialogs have the same data-drupal-selector attribute. Current patch adds also paragraph bundle to the attribute, to make it more unique. It will probably work for most cases, except when for some reason we have the same paragraph form opened in nested dialogs. This case will require each dialog to know how deep in the nesting level it is.
Current patch is a quick fix for the most people :)
- π©πͺGermany Anybody Porta Westfalica
Just ran into the same issue. I agree this is major and still existing in latest release.
- First commit to issue fork.
- Status changed to Fixed
4 months ago 4:26pm 26 July 2024 - Merge request !176#3359174: Form state errors break nested layout paragraphs dialog β (Merged) created by sethhill
-
sethhill β
committed fe1637f1 on 2.0.x
Issue #3359174 by sethhill, marjina-constantin: Form state errors break...
-
sethhill β
committed fe1637f1 on 2.0.x
- Status changed to Fixed
4 months ago 6:20pm 26 July 2024