Problem/Motivation
#2901158: Changes are lost when collapsing a paragraphs subform including an inline_entity_form causes
The website encountered an unexpected error. Please try again later.
TypeError: Argument 2 passed to Drupal\Component\Utility\NestedArray::getValue() must be of the type array, null given, called in /var/www/html/web/core/lib/Drupal/Core/Field/WidgetBase.php on line 405 in Drupal\Component\Utility\NestedArray::getValue() (line 69 of core/lib/Drupal/Component/Utility/NestedArray.php).
Drupal\Component\Utility\NestedArray::getValue(Array, NULL) (Line: 405)
Drupal\Core\Field\WidgetBase->extractFormValues(Object, Array, Object) (Line: 235)
Drupal\Core\Entity\Entity\EntityFormDisplay->extractFormValues(Object, Array, Object) (Line: 302)
Drupal\inline_entity_form\Form\EntityInlineForm->buildEntity(Array, Object, Object) (Line: 154)
Drupal\inline_entity_form\Plugin\Field\FieldWidget\InlineEntityFormSimple->extractFormValues(Object, Array, Object) (Line: 235)
Drupal\Core\Entity\Entity\EntityFormDisplay->extractFormValues(Object, Array, Object) (Line: 334)
Drupal\Core\Entity\ContentEntityForm->copyFormValuesToEntity(Object, Array, Object) (Line: 293)
Drupal\Core\Entity\EntityForm->buildEntity(Array, Object) (Line: 155)
Drupal\Core\Entity\ContentEntityForm->buildEntity(Array, Object) (Line: 278)
Drupal\Core\Entity\EntityForm->submitForm(Array, Object) (Line: 145)
Drupal\Core\Entity\ContentEntityForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 114)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 592)
Drupal\Core\Form\FormBuilder->processForm('owner_registration_add_form', Array, Object) (Line: 320)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object) (Line: 39)
Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork inline_entity_form-3270348
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
heddnAlso get:
Comment #3
heddnEntityInlineForm::submitCleanFormStateclears out the widget state, leading to the failure. That gets triggered becauseElementSubmit::attachinvokesElementSubmit::addCallbackand the submit handler processes _after_ the values are cleared from form state.Comment #4
geek-merlinThanks for filing that! Can you create a MR with the revert, PM me, i'll give green light.
Comment #6
heddnMR opened
Comment #7
heddnComment #9
geek-merlinOK committed and rolled rc11 release. Can you do the issue-paperwork concerning the followup?
Comment #10
heddnOpened #3271293: Changes are lost when collapsing a paragraphs subform including an inline_entity_form
Comment #11
james.williamsI see that the 8.x-1.0-rc11 tag was made, but not the actual release for this project. Should there be one? Or are you aiming to get that follow-up completed first?
Comment #12
geek-merlinTHX i forgot that step. Habemus releasem: https://www.drupal.org/project/inline_entity_form/releases/8.x-1.0-rc11