Issue: I receive the following error when adding an existing (and already added) node after having added a new node:
Notice: Undefined variable: attach_entity in inline_entity_form_reference_form_validate() (line 1151 of /this/is/my/sitepath/sites/all/modules/inline_entity_form/inline_entity_form.module).
This is on IEF version 7.x-1.5 with 1872316-ief-bundle-selection-erv-22_0.patch applied. Drupal core 7.34
I can recreate the issue by doing the following:
- Create a parent content type and a child content type, and add a few nodes to each
- Create an entity relationship from the parent to the child content type, set to use IEF. In my case I'm using an entity relationship view to filter the child nodes, using the mentioned patch to limit the bundle types.
- Use IEF to add two existing child nodes (eg: "A" and "B") to a parent node ("X")
- Add a new node ("C") to parent node "X".
- Try to add "A" or "B" to "X" again
- This error results
The error does not display without the "new" node added, I've attached screenshots for both states. I have not yet tried other combinations or quantities, but I have recreated the issue three separate times. This issue came up during alpha/regression testing. It is unlikely to come up in our production UI, but I wanted to document it.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | inline_entity_form-undefined-variable-form-validate-2419019.patch | 624 bytes | mstef |
| inline-entity-form-no-error.png | 36.95 KB | jweirather | |
| inline-entity-form-attach_entity-error.png | 57.38 KB | jweirather |
Comments
Comment #1
jweirather commentedComment #2
mstef commentedComment #3
bojanz commentedThat unset is definitely odd.
Comment #5
bojanz commentedCommitted the fix, thanks.