@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

  1. On parent add when clicking "add another" on the simple widget only 1 new entity form shows up
  2. On parent edit when clicking "add another" on the simple widget only 1 new entity form shows up
  3. 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.

CommentFileSizeAuthor
#2 ief-empty_forms_test-2685789-2.patch3.21 KBtedbow

Comments

tedbow created an issue. See original summary.

tedbow’s picture

Status: Active » Needs review
StatusFileSize
new3.21 KB

Here is the patch

Status: Needs review » Needs work

The last submitted patch, 2: ief-empty_forms_test-2685789-2.patch, failed testing.

tedbow’s picture

Status: Needs work » Needs review

Tests pass!

bojanz’s picture

Status: Needs review » Fixed

Yay, more tests! Thanks

  • bojanz committed 8e20f02 on 8.x-1.x authored by tedbow
    Issue #2685789 by tedbow: Add test coverage to ensure that empty entity...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.