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.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | multi-inline-entities-2643550-2.patch | 1.8 KB | maria.d |
Comments
Comment #2
maria.d CreditAttribution: maria.d commentedComment #3
maria.d CreditAttribution: maria.d commentedComment #4
maria.d CreditAttribution: maria.d commentedComment #5
slashrsm CreditAttribution: slashrsm at Examiner.com commentedCan you provide clear steps to reproduce this?
Comment #6
bojanz CreditAttribution: bojanz at Centarro commentedWe rewrote this code in #2667710: Rewrite the base inline form handling. Please test the latest -dev and reopen if problems persist.
Comment #7
tedbowThis 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