'Required contexts without a value: node' when editing menu

Created on 19 December 2016, about 8 years ago
Updated 10 August 2023, over 1 year ago

I'm running into this error whenever trying to edit a menu item

Drupal\Component\Plugin\Exception\ContextException: Required contexts without a value: node. in Drupal\Core\Plugin\Context\ContextHandler->applyContextMapping() (line 112 of /var/www/aaep.org/http/web/core/lib/Drupal/Core/Plugin/Context/ContextHandler.php).
When I add new menu items to replace the ones that weren't working using the same links and titles it works, but then another random menu link breaks.

Here is the full error message

The website encountered an unexpected error. Please try again later.

Drupal\Component\Plugin\Exception\ContextException: Required contexts without a value: node. in Drupal\Core\Plugin\Context\ContextHandler->applyContextMapping() (line 112 of core/lib/Drupal/Core/Plugin/Context/ContextHandler.php). Drupal\page_manager\Entity\PageAccess->checkAccess(Object, 'view', Object) (Line: 93) Drupal\Core\Entity\EntityAccessControlHandler->access(Object, 'view', Object, 1) (Line: 340) Drupal\Core\Entity\Entity->access('view', Object, 1) (Line: 61) Drupal\Core\Entity\EntityAccessCheck->access(Object, Object, Object) (Line: 29) Drupal\page_manager\Entity\PageAccessCheck->access(Object, Object, Object) call_user_func_array(Array, Array) (Line: 163) Drupal\Core\Access\AccessManager->performCheck('page_manager.page_access_check', Object) (Line: 139) Drupal\Core\Access\AccessManager->check(Object, Object, NULL, 1) (Line: 92) Drupal\Core\Access\AccessManager->checkNamedRoute('entity.node.canonical', Array, Object, 1) (Line: 67) Drupal\menu_link_content\MenuLinkContentAccessControlHandler->checkAccess(Object, 'update', Object) (Line: 93) Drupal\Core\Entity\EntityAccessControlHandler->access(Object, 'update', Object, 1) (Line: 593) Drupal\Core\Entity\ContentEntityBase->access('update', Object, 1) (Line: 61) Drupal\Core\Entity\EntityAccessCheck->access(Object, Object, Object) call_user_func_array(Array, Array) (Line: 163) Drupal\Core\Access\AccessManager->performCheck('access_check.entity', Object) (Line: 139) Drupal\Core\Access\AccessManager->check(Object, Object, Object, 1) (Line: 112) Drupal\Core\Access\AccessManager->checkRequest(Object, Object, 1) (Line: 102) Drupal\Core\Routing\AccessAwareRouter->checkAccess(Object) (Line: 87) Drupal\Core\Routing\AccessAwareRouter->matchRequest(Object) (Line: 154) Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(Object, 'kernel.request', Object) (Line: 111) Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.request', Object) (Line: 125) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23) Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 652) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

According to someone on stack overflow as seen here http://drupal.stackexchange.com/questions/223365/required-contexts-witho...

According to that backtrace, it looks like you have a link to a page_manager page and there you probably have access conditions to limit access to a certain node type or so.

That's a page_manager bug that you need to report there. The exception can be fixed pretty easily, but it is also possible that you then simply don't have access to edit that menu link, as page_manager things that access is denied as the node type isn't matching as there is no node. That might be a bit harder to fix.

Part of that might be because the core permission to see and edit all menu links (link to any page or so) isn't fully working either.

πŸ› Bug report
Status

Needs review

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States matthew.h

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

Merge Requests

Comments & Activities

Not all content is available!

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

Production build 0.71.5 2024