Hello,
I'm opening a new issue as I didn't seem to be able to reopen the other issue…
https://www.drupal.org/project/inline_entity_form/issues/2830328#comment...
I just updated from rc1 to rc2 and our inline_entity_form for existing entities started not working. Reverting back to rc1 got everything working again.
In rc2 when trying to select an existing image I would get the following error…
Notice: Undefined index: entity_id in Drupal\inline_entity_form\Plugin\Field\FieldWidget\InlineEntityFormComplex->extractFormValues() (line 621 of /modules/contrib/inline_entity_form/src/Plugin/Field/FieldWidget/InlineEntityFormComplex.php).
Please let me know if you need more information.
Thanks,
•• matt
Comments
Comment #2
mattltComment #3
mariacha1 commentedHere's a little patch that wraps around the warning you get if there is no set `entity_id` in the internal form.
Comment #4
geek-merlinThanks @MattIt for raising this.
> I just updated from rc1 to rc2 and our inline_entity_form for existing entities started not working.
"started not working" is not helpful though. Is there any other problem apart from the warning? Please learn about writing good issue summaries! Also check if your problem persists with current dev and change the version to dev. Thanks!
FTR: In the related issue, a missing codepath for existing entities was added in the complex widget.
Comment #5
mariacha1 commentedI'm updating the issue version and the description, because I can confirm it's still a problem in the dev branch.
If you have PHP set to show all errors and warnings, the notice thrown
Undefined index: entity_id in src/Plugin/Field/FieldWidget/InlineEntityFormComplex.php on line 621shows up above the ajax response, and that keeps the "Browse" button from connecting with the IEF form. To the user, the form appears to refresh without connecting to the selected block.Here's a little video:

I am using Drupal 8.8.1 if that helps.
Comment #6
geek-merlin@mariacha1:
Thanks for updating this, this is totally well described!
(Next time please put your text in the issue summary, which helps a lot if the issue gets long, but i don't see that problem here, hopefully.)
> If you have PHP set to show all errors and warnings, the notice thrown Undefined index: entity_id in src/Plugin/Field/FieldWidget/InlineEntityFormComplex.php on line 621 shows up above the ajax response, and that keeps the "Browse" button from connecting with the IEF form. To the user, the form appears to refresh without connecting to the selected block.
So if you suppress errors and warnings via admin/config/development/logging, everything works as expected?
Does the patch above fix the problem for you?
Comment #7
mariacha1 commentedOh, thanks for letting me know! I never know how sacred the initial description is :).
Yes, that patch fixes the issue for me (as does turning error reporting off in php).
Comment #8
geek-merlin> how sacred the initial description is :).
Often it ends up at the bottom with heading "Original description".
> Yes, that patch fixes the issue for me (as does turning error reporting off in php).
OK, code makes sense, as maintainer setting RTBC for this and will commit later.
Comment #10
geek-merlinComitted, thanks!