The following error occurs on the site if Smart Content is enabled without first enabling Layout Builder.

The website encountered an unexpected error. Please try again later.
Error: Class 'Drupal\layout_builder\LayoutBuilderEvents' not found in Drupal\smart_content_block\EventSubscriber\LayoutBuilderComponentRenderArray::getSubscribedEvents() (line 19 of /var/www/vanilla9/web/modules/custom/smart_content/modules/smart_content_block/src/EventSubscriber/LayoutBuilderComponentRenderArray.php).

Comments

gantal created an issue. See original summary.

  • gantal committed 4c2a2de on 3.x
    Issue #3155227: Added a check for Layout Builder before using it in...
gantal’s picture

Status: Active » Fixed
gantal’s picture

Status: Fixed » Needs work

Actually, the fix in the last commit leads to another error, so this still needs work.

The website encountered an unexpected error. Please try again later.
Drupal\Core\DependencyInjection\ContainerNotInitializedException: \Drupal::$container is not initialized yet. \Drupal::setContainer() must be called with a real container. in Drupal::getContainer() (line 128 of /var/www/vanilla9/web/core/lib/Drupal.php).

  • gantal committed 9165be4 on 3.x
    Issue #3155227 by gantal: Replaced class constant with string
    
gantal’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.