Error when creating Drag&Drop structure. Tons of warnings when saving simple page.

Created on 5 October 2023, about 1 year ago
Updated 15 October 2023, about 1 year ago

Problem/Motivation

Setup: Drupal 10.1.5 upgraded from 9.5.10, PHP 8.1.23. (1) Error message is triggered when creating a Drag and Drop page structure and going to structure/types/manage/drag_and_drop_page/form-display. (2) Furthermore, a simple page created with DXPR builder throws tons of warnings.

Steps to reproduce

Installed DXPR Theme and Builder on said site. Going from the admin/structure/types/manage/drag_and_drop_page/fields to /form-display elicits this error message:

(1)
Deprecated function: strnatcasecmp(): Passing null to parameter #2 ($string2) of type string is deprecated in Drupal\Core\Layout\LayoutPluginManager->Drupal\Core\Layout\{closure}() (line 204 of core/lib/Drupal/Core/Layout/LayoutPluginManager.php).

Drupal\Core\Layout\LayoutPluginManager->Drupal\Core\Layout\{closure}(Object, Object)
uasort(Array, Object) (Line: 207)
Drupal\Core\Layout\LayoutPluginManager->getSortedDefinitions(Array, 'label') (Line: 217)
Drupal\Core\Layout\LayoutPluginManager->getGroupedDefinitions() (Line: 230)
Drupal\Core\Layout\LayoutPluginManager->getLayoutOptions() (Line: 64)
Drupal\field_layout\Form\FieldLayoutEntityFormDisplayEditForm->form(Array, Object) (Line: 107)
Drupal\Core\Entity\EntityForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 536)
Drupal\Core\Form\FormBuilder->retrieveForm('entity_form_display_edit_form', Object) (Line: 283)
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: 592)
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: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 270)
Drupal\shield\ShieldMiddleware->bypass(Object, 1, 1) (Line: 226)
Drupal\shield\ShieldMiddleware->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)

Maybe the next one is somewhat related: In a previously created simple page designed with DXPR builder 2.5.0 I still get a ton of repeated warnings when saving changes directly in the body field, e. g. after correcting a typo. Does this belong to the Core/LB issues, or is it triggered by DXPR and should be solved here?

(2)
Warning: Undefined array key "default_formatter" in Drupal\layout_builder\Plugin\Block\FieldBlock->defaultConfiguration() (line 232 of core/modules/layout_builder/src/Plugin/Block/FieldBlock.php).

Drupal\layout_builder\Plugin\Block\FieldBlock->defaultConfiguration() (Line: 82)
Drupal\Core\Block\BlockBase->setConfiguration(Array) (Line: 66)
Drupal\Core\Block\BlockBase->__construct(Array, 'extra_field_block:commerce_product_variation:adhs_kompakt_06_2023:entity_print_view_pdf', Array) (Line: 126)
Drupal\layout_builder\Plugin\Block\FieldBlock->__construct(Array, 'extra_field_block:commerce_product_variation:adhs_kompakt_06_2023:entity_print_view_pdf', Array, Object, Object, Object, Object) (Line: 51)
Drupal\commerce_product\Plugin\Block\VariationFieldBlock->__construct(Array, 'extra_field_block:commerce_product_variation:adhs_kompakt_06_2023:entity_print_view_pdf', Array, Object, Object, Object, Object, Object) (Line: 67)
Drupal\commerce_product\Plugin\Block\VariationFieldBlock::create(Object, Array, 'extra_field_block:commerce_product_variation:adhs_kompakt_06_2023:entity_print_view_pdf', Array) (Line: 21)
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('extra_field_block:commerce_product_variation:adhs_kompakt_06_2023:entity_print_view_pdf', Array) (Line: 76)
Drupal\Component\Plugin\PluginManagerBase->createInstance('extra_field_block:commerce_product_variation:adhs_kompakt_06_2023:entity_print_view_pdf', Array) (Line: 145)
Drupal\dxpr_builder\Service\Handler\BlockHandler->blockAccess('extra_field_block:commerce_product_variation:adhs_kompakt_06_2023:entity_print_view_pdf', Array) (Line: 545)
Drupal\dxpr_builder\Service\DxprBuilderService->getCmsElementNames() (Line: 366)
Drupal\dxpr_builder\Service\DxprBuilderService->editorAttach(Array, Array) (Line: 652)
Drupal\dxpr_builder\Plugin\Field\FieldFormatter\DxprBuilderFormatter->attachAssets('58|507|body', Array, ' ', Array, 1, 'static', 'de') (Line: 508)
Drupal\dxpr_builder\Plugin\Field\FieldFormatter\DxprBuilderFormatter->viewElements(Object, 'de') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'de') (Line: 265)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 268)
Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay->buildMultiple(Array) (Line: 339)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 281)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 238)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725 ', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 797)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 386)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 238)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 592)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 239)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 128)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 187)
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: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 270)
Drupal\shield\ShieldMiddleware->bypass(Object, 1, 1) (Line: 226)
Drupal\shield\ShieldMiddleware->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)

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Postponed: needs info

Version

2.5

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024