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.
@skyredwang was reporting here that he was seeing an extra empty entity form on edit which stopped validation from working.
I can't reproduce this now but I did see this when I was writing the patch for the issue #2664626: Add another item does NOT work the first time it is clicked on simple widget
This issue will add test coverage for 3 things
- On parent add when clicking "add another" on the simple widget only 1 new entity form shows up
- On parent edit when clicking "add another" on the simple widget only 1 new entity form shows up
- When editing entity with a simple widget no extra entity form is added until you click add another.
These tests should all pass now but if we need to tweak InlineEntityFormSimple::formMultipleElements these problems could arise.
I would rather get these test in now while somebody remembers this could happen.
Comment | File | Size | Author |
---|---|---|---|
#2 | ief-empty_forms_test-2685789-2.patch | 3.21 KB | tedbow |
|
Comments
Comment #2
tedbowHere is the patch
Comment #4
tedbowTests pass!
Comment #5
bojanz CreditAttribution: bojanz commentedYay, more tests! Thanks