diff -u b/core/lib/Drupal/Core/Entity/ContentEntityForm.php b/core/lib/Drupal/Core/Entity/ContentEntityForm.php --- b/core/lib/Drupal/Core/Entity/ContentEntityForm.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityForm.php @@ -352,7 +352,10 @@ // entity should be deeply serialized as part of the form object // serialization. foreach ($form_display->getComponents() as $component) { - if (($widget_definition = $this->widgetPluginManager->getDefinition($component['type'])) && !empty($widget_definition['entity_deep_serialization'])) { + // There might be components that don't have a type property, therefore + // we have to check that the component has a type. This could occur by + // adding components e.g. through hook_entity_extra_field_info(). + if (isset($component['type']) && ($widget_definition = $this->widgetPluginManager->getDefinition($component['type'])) && !empty($widget_definition['entity_deep_serialization'])) { $this->entityDeepSerializationRequired = TRUE; break; }