Argument 4 passed to Drupal\Core\Field\WidgetBase::setWidgetState() must be of the type array, null given

Created on 20 July 2020, almost 4 years ago
Updated 25 March 2023, over 1 year ago

i get white screen error as follows when trying to replicate a content entity under drupal 9:

[20-Jul-2020 22:16:12 UTC] TypeError: Argument 4 passed to Drupal\Core\Field\WidgetBase::setWidgetState() must be of the type array, null given, called in D:\wamp64\www\workbench\workbench_d9_test1\modules\contrib\inline_entity_form\src\Plugin\Field\FieldWidget\InlineEntityFormSimple.php on line 179 in D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Field\WidgetBase.php on line 489 #0 D:\wamp64\www\workbench\workbench_d9_test1\modules\contrib\inline_entity_form\src\Plugin\Field\FieldWidget\InlineEntityFormSimple.php(179): Drupal\Core\Field\WidgetBase::setWidgetState(Array, 'field_extended_...', Object(Drupal\Core\Form\FormState), NULL)
#1 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Entity\Entity\EntityFormDisplay.php(232): Drupal\inline_entity_form\Plugin\Field\FieldWidget\InlineEntityFormSimple->extractFormValues(Object(Drupal\Core\Field\EntityReferenceFieldItemList), Array, Object(Drupal\Core\Form\FormState))
#2 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Entity\ContentEntityForm.php(334): Drupal\Core\Entity\Entity\EntityFormDisplay->extractFormValues(Object(Drupal\node\Entity\Node), Array, Object(Drupal\Core\Form\FormState))
#3 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Entity\EntityForm.php(293): Drupal\Core\Entity\ContentEntityForm->copyFormValuesToEntity(Object(Drupal\node\Entity\Node), Array, Object(Drupal\Core\Form\FormState))
#4 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Entity\ContentEntityForm.php(155): Drupal\Core\Entity\EntityForm->buildEntity(Array, Object(Drupal\Core\Form\FormState))
#5 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Entity\EntityForm.php(278): Drupal\Core\Entity\ContentEntityForm->buildEntity(Array, Object(Drupal\Core\Form\FormState))
#6 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Entity\ContentEntityForm.php(145): Drupal\Core\Entity\EntityForm->submitForm(Array, Object(Drupal\Core\Form\FormState))
#7 D:\wamp64\www\workbench\workbench_d9_test1\modules\contrib\replicate_ui\src\Form\ReplicateConfirmForm.php(91): Drupal\Core\Entity\ContentEntityForm->submitForm(Array, Object(Drupal\Core\Form\FormState))
#8 [internal function]: Drupal\replicate_ui\Form\ReplicateConfirmForm->submitForm(Array, Object(Drupal\Core\Form\FormState))
#9 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Form\FormSubmitter.php(113): call_user_func_array(Array, Array)
#10 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Form\FormSubmitter.php(51): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object(Drupal\Core\Form\FormState))
#11 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Form\FormBuilder.php(593): Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object(Drupal\Core\Form\FormState))
#12 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Form\FormBuilder.php(321): Drupal\Core\Form\FormBuilder->processForm('node_transactio...', Array, Object(Drupal\Core\Form\FormState))
#13 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Controller\FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\replicate_ui\Form\ReplicateConfirmForm), Object(Drupal\Core\Form\FormState))
#14 D:\wamp64\www\workbench\workbench_d9_test1\core\modules\layout_builder\src\Controller\LayoutBuilderHtmlEntityFormController.php(39): Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
#15 [internal function]: Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
#16 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#17 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\Render\Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#18 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#19 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#20 D:\wamp64\www\workbench\workbench_d9_test1\vendor\symfony\http-kernel\HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#21 D:\wamp64\www\workbench\workbench_d9_test1\vendor\symfony\http-kernel\HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#22 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\StackMiddleware\Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\StackMiddleware\KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 D:\wamp64\www\workbench\workbench_d9_test1\core\modules\page_cache\src\StackMiddleware\PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 D:\wamp64\www\workbench\workbench_d9_test1\core\modules\page_cache\src\StackMiddleware\PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\StackMiddleware\ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\StackMiddleware\NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 D:\wamp64\www\workbench\workbench_d9_test1\vendor\stack\builder\src\Stack\StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 D:\wamp64\www\workbench\workbench_d9_test1\core\lib\Drupal\Core\DrupalKernel.php(705): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 D:\wamp64\www\workbench\workbench_d9_test1\index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#31 {main}
πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡―πŸ‡΄Jordan bmustafa

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.69.0 2024