EntityInlineForm.php entityFormValidate function:

When I added 2 required inline entities and tried to create one of them without fill the fields of another, I got an error "This value should not be null".
Its happened because Inline entity module makes validation over all inline entities that exist, and sets error of all inline entities:
$form_state->setError($triggering_element, $message);

I added patch that fix it.

CommentFileSizeAuthor
#2 multi-inline-entities-2643550-2.patch1.8 KBmaria.d
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

maria.d created an issue. See original summary.

maria.d’s picture

maria.d’s picture

Issue summary: View changes
maria.d’s picture

Issue summary: View changes
Status: Active » Needs work
slashrsm’s picture

Can you provide clear steps to reproduce this?

bojanz’s picture

Status: Needs work » Closed (duplicate)

We rewrote this code in #2667710: Rewrite the base inline form handling. Please test the latest -dev and reopen if problems persist.

tedbow’s picture

This doesn't seem to happen anymore.

To test I:
Created 1 content
Added 2 required entity reference
Set both to use IEF Complex widget
went to node/add/my-type
filled out 1 ief node but not other
hit create node on filled out node.
Was able to submitted without other being filled
then able to submit other then save parent node