- π¨π΄Colombia Freddy Rodriguez BogotΓ‘
jernejmramor π Notice: Trying to access array offset on value of type null in Drupal\Core\Menu\Plugin\Block\LocalTasksBlock->blockSubmit() (line 153 of core/lib/Drupal/Core/Menu/Plugin/Block/LocalTasksBlock.php). Active
This is the context config.
- πΊπΈUnited States pdxclankeith
I've run into this same problem on Drupal 10.1.5 and Context 5.0.0-rc1. Has there been any movement on getting a fix/patch for this?
Error message is for the SystemBrandingBlock:
Warning: Trying to access array offset on value of type null in Drupal\system\Plugin\Block\SystemBrandingBlock->blockSubmit() (line 142 of core/modules/system/src/Plugin/Block/SystemBrandingBlock.php). Drupal\system\Plugin\Block\SystemBrandingBlock->blockSubmit(Array, Object) (Line: 234) Drupal\Core\Block\BlockBase->submitConfigurationForm(Array, Object) (Line: 756) Drupal\context\Plugin\ContextReaction\Blocks->submitConfigurationForm(Array, Object) (Line: 207) Drupal\context_ui\Form\ContextFormBase->handleReactions(Array, Object) (Line: 150) Drupal\context_ui\Form\ContextFormBase->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: 597) Drupal\Core\Form\FormBuilder->processForm('context_edit_form', Array, Object) (Line: 325) 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: 617) 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: 182) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76) 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: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- π¬π§United Kingdom mistergroove
This issue still exists for me on both 8.x-4.x and 5.0.0-rc1
Warning: Trying to access array offset on value of type null in Drupal\system\Plugin\Block\SystemBrandingBlock->blockSubmit() (line 142 of core/modules/system/src/Plugin/Block/SystemBrandingBlock.php).
Warning: Trying to access array offset on value of type null in Drupal\system\Plugin\Block\SystemBrandingBlock->blockSubmit() (line 143 of core/modules/system/src/Plugin/Block/SystemBrandingBlock.php).
Warning: Trying to access array offset on value of type null in Drupal\system\Plugin\Block\SystemBrandingBlock->blockSubmit() (line 144 of core/modules/system/src/Plugin/Block/SystemBrandingBlock.php). - π·π΄Romania cslevy
This will happen for all Blocks, that has a hierarchical structure in the form.
$block_state = (new FormState())->setValues($configuration); $block->submitConfigurationForm($form, $block_state);
Here the FormState is initialised with the $configuration values which is a simple array, but if you check the SystemBrandingBlock or LocalTasksBlock blockSubmits, you can see that the values from the fieldset are moved to the top level values.
So this is a general issue, and will show up for every block which has hierarchical form structure.