ECA Form: Broken Ajax rebuilds when Inline Entity Form is involved
Problem/Motivation
When eca_form and inline_entity_form are both installed, there appears a problem when using an "Inline Entity Form - Simple" widget.
Steps to reproduce
- New Drupal 11.2 installation with standard profile. ECA 2.1.10 and most recent Inline Entity Form module. Install following modules:
eca_base, eca_form, eca_content, eca_user, bpmn_io, inline_entity_form - Go to "Manage fields" of the "article" content type. There add two file upload fields. Add an entity reference field to node of type "page".
- Go to "Manage form display" of the "article" content type. There enable "Inline Entity Form - Simple" widget for the entity reference field to the "page" node. Place it underneath the title field, so that the two file upload fields appear below the inline entity form.
- Now try to create a new "article" node at /node/add/article. Fill in required fields. Skip filling the inline entity form of "page" content, instead try to upload a file at one of the two file upload fields.
You will see that whenever trying to upload a file, the uploaded file does not appear - the widget stays empty after the Ajax refresh.
Proposed resolution
None yet.
Remaining tasks
The problem is being caused by ECA when invoking method Drupal\eca_form\HookHandler::inlineEntityFormAfterBuild. When not invoking this method, the problem does not show up.
User interface changes
API changes
Data model changes
Edited by drupalbot