The context is not a valid context.

Created on 1 August 2022, about 3 years ago
Updated 27 May 2025, 2 months ago

Problem/Motivation

The context is not a valid context.

🐛 Bug report
Status

Closed: duplicate

Version

1.10

Component

Code

Created by

🇺🇦Ukraine MykolaVeryha

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy charly71

    Pathauto 8.x-1.13
    Chaos Tool Suite (ctools) 8.x-3.15
    Drupal 9.5.11

    The issue is still active. Tried to /node/add/page

    Drupal\Component\Plugin\Exception\ContextException: The context is not a valid context. in Drupal\Core\Executable\ExecutablePluginBase->getContextDefinition() (line 184 of core/lib/Drupal/Core/Plugin/ContextAwarePluginTrait.php).
    Drupal\Core\Executable\ExecutablePluginBase->getContext(NULL) (Line: 116)
    Drupal\Core\Executable\ExecutablePluginBase->getContextValue(NULL) (Line: 91)
    Drupal\Core\Entity\Plugin\Condition\EntityBundle->evaluate() (Line: 77)
    Drupal\Core\Condition\ConditionManager->execute(Object) (Line: 84)
    Drupal\Core\Condition\ConditionPluginBase->execute() (Line: 383)
    Drupal\pathauto\Entity\PathautoPattern->applies(Object) (Line: 321)
    Drupal\pathauto\PathautoGenerator->getPatternByEntity(Object) (Line: 41)
    Drupal\pathauto\PathautoWidget->formElement(Object, 0, Array, Array, Object) (Line: 353)
    Drupal\Core\Field\WidgetBase->formSingleElement(Object, 0, Array, Array, Object) (Line: 220)
    Drupal\Core\Field\WidgetBase->formMultipleElements(Object, Array, Object) (Line: 111)
    Drupal\Core\Field\WidgetBase->form(Object, Array, Object) (Line: 183)
    Drupal\Core\Entity\Entity\EntityFormDisplay->buildForm(Object, Array, Object) (Line: 121)
    Drupal\Core\Entity\ContentEntityForm->form(Array, Object) (Line: 127)
    Drupal\node\NodeForm->form(Array, Object) (Line: 106)
    Drupal\Core\Entity\EntityForm->buildForm(Array, Object)
    call_user_func_array(Array, Array) (Line: 536)
    Drupal\Core\Form\FormBuilder->retrieveForm('node_page_form', Object) (Line: 283)
    Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
    Drupal\Core\Controller\FormController->getContentResult(Object, Object)
    call_user_func_array(Array, Array) (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
    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: 169)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 45)
    Drupal\shib_auth\RedirectMiddleware->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: 23)
    Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Production build 0.71.5 2024