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.
Create a paragraph type with an entity_reference field using inline_entity_form.
Add a paragraphs field to a node, make the paragraph type available and use paragraphs widget in 'Closed' edit mode.
Add a node with a paragraph, enter some test values and save. Edit the node again, edit the paragraph, now collapse the paragraphs subform: Your changes to the subform will be lost.
Comment | File | Size | Author |
---|---|---|---|
#17 | 2901158-17.patch | 6.57 KB | chr.fritsch |
| |||
#17 | 2901158-17-fail.patch | 3.29 KB | chr.fritsch |
#16 | 2901158-16.patch | 3.28 KB | Spokje |
| |||
#12 | 2901158-11.patch | 3.33 KB | subhojit777 |
#10 | 2901158-10.patch | 3.01 KB | subhojit777 |
Issue fork inline_entity_form-2901158
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
Comment #2
volkerk CreditAttribution: volkerk at Thunder commentedComment #3
volkerk CreditAttribution: volkerk at Thunder commentedComment #4
volkerk CreditAttribution: volkerk at Thunder commentedFixes lost values in form rebuild, requires patch from #2830829.
Comment #5
volkerk CreditAttribution: volkerk at Thunder commentedComment #6
nkoporecTested your patch, and it does work on simple widget but I think we should implement this on complex widget too. Also small coding standards issues:
1. Expected one space after closing parentheses.
2. I think moving the comment from EntityInlineForm to InlineFormInterface should be a separated issue(or added to existing similar issue) since it's not related to this one and should be remove from the patch.
Comment #7
volkerk CreditAttribution: volkerk at Thunder commented1. Fixed cs.
2. Removed. Could you point out the existing similar issue?
Comment #8
neeravbm CreditAttribution: neeravbm at Red Crackle commentedI just tested the patch. As @nkoporec mentions, it works for simple widget but not for complex widget. For complex widget, there is an Update button though so it could be a workaround. But I do agree that it needs to be implemented with complex widget as well.
Comment #9
tonytheferg CreditAttribution: tonytheferg commentedI am having an issue using complex IEF that are nested in a node. I have a 1:1 product and variation in an inline entity form, and when you attempt to edit the form, you can update the product (parent), but but you cant update the child (variation). If you save the node with the IEF open in edit mode, the child updates as you would expect it to by simply updating the IEF.
It sounds like this is a common problem, unrelated to products from this on Drupal Answers, so I am wondering if this is the right issue?
Comment #10
subhojit777patch rerolled
Comment #12
subhojit777forgot to add the import
Comment #13
miro_dietikerI think it would really help to have tests here to avoid breaking this again in future.
Comment #14
geek-merlinIEF rc9 is out and has some fixes for nested forms. Can this still be reproduced?
Comment #15
keopxThe problem continues and it cannot be applied
Comment #16
SpokjeReroll of #12
Comment #17
chr.fritschI tried to build a small test the shows that there is a general problem during ajax requests, that the form is not rebuild properly.
Comment #18
daniel.bosenThe test is quite nice, I think. And the actual patch has proven to fix the problem for years now and we need it for multiple modules. "Entity reference actions" and "Media Library Media Modify" both have it as patches in their composer.json files.
Would be really nice to get this one in!
Comment #19
geek-merlinTBH i do not completely grok that, but changes look reasonable, and we now have a test.
If someone makes a MR, it's easier for me to commit.
Comment #21
chr.fritschSure, here you go :)
Comment #23
geek-merlinThanks everyone for working on this!
Committed and rolled new release. Rock on!
Comment #25
heddnThis commit caused regressions with non paragraph IEF fields. I have an (albiet complex) IEF implementation for user that completely broke after this commit. Any chance this could see a revert while a test coverage and fixes are added?
Comment #26
heddnOpened #3270348: Regression from #2901158.
Comment #27
geek-merlinAs @heddn noted, this change caused a regression, so it was reverted in #3270348: Regression from #2901158.
Please continue in #3271293: Changes are lost when collapsing a paragraphs subform including an inline_entity_form