$widget_state['entities'] null error

Created on 15 February 2017, almost 8 years ago
Updated 16 April 2024, 8 months ago

I haven't dug deep into debugging this, but when editing an existing node with nested inline entity form fields I get a fatal error.

log shows 3 entries starting with Warning: Invalid argument supplied for foreach() in Drupal\inline_entity_form\Plugin\Field\FieldWidget\InlineEntityFormComplex->extractFormValues() (line 554 of ...

Looking at this when I submitted my node form $widget_state['entities'] was null for the last element running extractFormValues() on...

adding

  if(!$widget_state['entities']) {
      return;
  }

foreach ($widget_state['entities'] as $key => $value) { ... }

temporarily fixes this issue for me... but need to know more what this should do before being able to contribute a patch. Can any confirm is this is actually and issue/been reported?

NB: Uploading .patch so I can continue, but this is by no means an accurate solution to a problem, if one indeed exists.

🐛 Bug report
Status

Active

Component

Code

Created by

🇬🇧United Kingdom 4alldigital

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024