Error when placing a block

Created on 19 December 2023, 6 months ago
Updated 14 February 2024, 4 months ago

Problem/Motivation

I've installed Umami with Layout Builder plus. I'm trying to place a "Basic Block" block to a layout override of the Recipe content type. I'm getting following errors:


Message	Warning: Undefined array key "layout_plugin" in Drupal\lb_plus\EventSubscriber\LayoutBlock->onPostPlaceBlockFormBuild() (line 46 of /var/www/html/drupal/modules/lb_plus/src/EventSubscriber/LayoutBlock.php)
#0 /var/www/html/drupal/core/includes/bootstrap.inc(164): _drupal_error_handler_real(2, 'Undefined array...', '/var/www/html/d...', 46)
#1 /var/www/html/drupal/modules/lb_plus/src/EventSubscriber/LayoutBlock.php(46): _drupal_error_handler(2, 'Undefined array...', '/var/www/html/d...', 46)
#2 [internal function]: Drupal\lb_plus\EventSubscriber\LayoutBlock->onPostPlaceBlockFormBuild(Object(Drupal\lb_plus\Event\PlaceBlockEvent), 'Drupal\\lb_plus\\...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#3 /var/www/html/drupal/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Drupal\lb_plus\Event\PlaceBlockEvent), 'Drupal\\lb_plus\\...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#4 /var/www/html/drupal/modules/lb_plus/src/Controller/DropZones.php(200): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Drupal\lb_plus\Event\PlaceBlockEvent), 'Drupal\\lb_plus\\...')
#5 [internal function]: Drupal\lb_plus\Controller\DropZones->placeBlock(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage), NULL)
#6 /var/www/html/drupal/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#7 /var/www/html/drupal/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#8 /var/www/html/drupal/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#9 /var/www/html/drupal/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#10 /var/www/html/drupal/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#11 /var/www/html/drupal/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#12 /var/www/html/drupal/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#13 /var/www/html/drupal/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#14 /var/www/html/drupal/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#15 /var/www/html/drupal/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 /var/www/html/drupal/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /var/www/html/drupal/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /var/www/html/drupal/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /var/www/html/drupal/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /var/www/html/drupal/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /var/www/html/drupal/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#22 {main}
.

Followed by:

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" plugin does not exist. Valid plugin IDs for Drupal\Core\Layout\LayoutPluginManager are: layout_twocol_section, layout_threecol_section, layout_fourcol_section, layout_onecol, layout_twocol, layout_twocol_bricks, layout_threecol_25_50_25, layout_threecol_33_34_33, layout_oneplusfourgrid_section, layout_builder_blank in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of /var/www/html/drupal/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇫🇮Finland lauriii Finland

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

Merge Requests

Comments & Activities

  • Issue created by @lauriii
  • 🇺🇸United States Tim Bozeman

    Heya lauriii,

    Thanks for the issue! At some point since this issue was created we started catching that error and saying Please configure a default layout for this section. in the logs. I think this is happening because your Basic block has it's layout managed by Layout Builder, but the Default layout for that block hasn't been set. I think you can set it at /admin/structure/types/manage/node.recipe.full/default-layout-section.

    Whatcha think? Does that get it going for ya?

  • Status changed to Fixed 5 months ago
  • 🇺🇸United States Tim Bozeman

    Heya lauriii,

    Now that Layout Builder Plus is in good shape I thought it might be handy to add an Umami demo module that sets Layout Builder Plus up. To try out Layout Builder Plus run:

    composer require drupal/lb_plus drupal/field_sample_value
    drush si demo_umami -y; drush en lb_plus_ooo_mommy -y; drush uli
    
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024