0

After upgrading to version 8.8.5, I can't access the main web page, but I can log in to the admin panel. When I turn on the verbose logging funcionality I receive the following error message:

Drupal\Component\Plugin\Exception\MissingValueContextException: Required contexts without a value: view_mode in Drupal\Core\Plugin\Context\ContextHandler->applyContextMapping() (line 155 of core/lib/Drupal/Core/Plugin/Context/ContextHandler.php).

Drupal\panels\Plugin\DisplayBuilder\StandardDisplayBuilder->buildRegions() (Line: 183)
Drupal\panels\Plugin\DisplayBuilder\StandardDisplayBuilder->build() (Line: 338)
Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant->build() (Line: 29) 
Drupal\page_manager\Entity\PageVariantViewBuilder->view() (Line: 105) 
Drupal\Core\Entity\Controller\EntityViewController->view() call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 68) 
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 57)
Drupal\Core\StackMiddleware\Session->handle() (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch() (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup() (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 708)
Drupal\Core\DrupalKernel->handle() (Line: 19)

I don't know if this is a core or a module error, any help appreciated.

Actual system: Drupal 8.8.5, PHP 7.4.5, 5.5.5-10.1.44-MariaDB-0+deb9u1

Thanks.

1
  • Seems to relate to Panels. Apr 24 '20 at 11:59
0

It seems to be related to a new constraint added on releases, as seen on https://www.drupal.org/project/drupal/issues/3113474

As "view mode" is asked, with no default context, some modules like Panels IPE, Panels, MiniLayout may generate problems if you ask to display a single entity field as FieldBlock.

Just apply patch on https://www.drupal.org/files/issues/2020-02-13/3001313--63_0.patch ; for the record :

--- a/core/modules/layout_builder/src/Plugin/Derivative/FieldBlockDeriver.php
+++ b/core/modules/layout_builder/src/Plugin/Derivative/FieldBlockDeriver.php
@@ -124,7 +124,14 @@ public function getDerivativeDefinitions($base_plugin_definition) {
           $context_definition->addConstraint('Bundle', [$bundle]);
           $derivative['context_definitions'] = [
             'entity' => $context_definition,
-            'view_mode' => new ContextDefinition('string'),
+            'view_mode' =>  new ContextDefinition(
+              'string',
+              $this->t('View Mode'),
+              FALSE,
+              FALSE,
+              NULL,
+              'default'
+            ),
           ];

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.