Error: Call to a member function bundle() on null in \\drupal9\\app\\core\\lib\\Drupal\\Core\\Entity\\Plugin\\Condition\\EntityBundle.php on line 92

Created on 9 March 2022, over 2 years ago
Updated 3 October 2023, about 1 year ago

Problem/Motivation

Error: Call to a member function bundle() on null in \\drupal9\\app\\core\\lib\\Drupal\\Core\\Entity\\Plugin\\Condition\\EntityBundle.php on line 92 #0 \\drupal9\\app\\core\\lib\\Drupal\\Core\\Condition\\ConditionManager.php(77): Drupal\\Core\\Entity\\Plugin\\Condition\\EntityBundle->evaluate()\n#1 \\drupal9\\app\\core\\lib\\Drupal\\Core\\Condition\\ConditionPluginBase.php(84): Drupal\\Core\\Condition\\ConditionManager->execute(Object(Drupal\\Core\\Entity\\Plugin\\Condition\\EntityBundle))\n#2 drupal9\\app\\core\\lib\\Drupal\\Core\\Condition\\ConditionAccessResolverTrait.php(26): Drupal\\Core\\Condition\\ConditionPluginBase->execute()\n#3 \\drupal9\\app\\modules\\contrib\\context\\src\\ContextManager.php(351): Drupal\\context\\ContextManager->resolveConditions(Object(Drupal\\Core\\Condition\\ConditionPluginCollection), 'or')\n#4 drupal9\\app\\modules\\contrib\\context\\src\\ContextManager.php(253): Drupal\\context\\ContextManager->evaluateContextConditions(Object(Drupal\\context\\Entity\\Context))\n#5 drupal9\\app\\modules\\contrib\\context\\src\\ContextManager.php(241): Drupal\\context\\ContextManager->evaluateContexts()\n#6 \\drupal9\\app\\modules\\contrib\\context\\src\\ContextManager.php(273): Drupal\\context\\ContextManager->getActiveContexts()\n#7 \\drupal9\\app\\modules\\contrib\\context\\src\\EventSubscriber\\BlockPageDisplayVariantSubscriber.php(44): Drupal\\context\\ContextManager->getActiveReactions()\n#8 [internal function]: Drupal\\context\\EventSubscriber\\BlockPageDisplayVariantSubscriber->onSelectPageDisplayVariant(Object(Drupal\\Core\\Render\\PageDisplayVariantSelectionEvent), 'render.page_dis...', Object(Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher))\n#9 \\drupal9\\app\\core\\lib\\Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Drupal\\Core\\Render\\PageDisplayVariantSelectionEvent), 'render.page_dis...', Object(Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher))\n#10 \\drupal9\\app\\core\\lib\\Drupal\\Core\\Render\\MainContent\\HtmlRenderer.php(224): Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher->dispatch(Object(Drupal\\Core\\Render\\PageDisplayVariantSelectionEvent), 'render.page_dis...')\n#11 \\drupal9\\app\\core\\lib\\Drupal\\Core\\Render\\MainContent\\HtmlRenderer.php(132): Drupal\\Core\\Render\\MainContent\\HtmlRenderer->prepare(Array, Object(Symfony\\Component\\HttpFoundation\\Request), Object(Drupal\\Core\\Routing\\CurrentRouteMatch))\n#12

Steps to reproduce

Getting above error when trying to add Custom menu link bundle (menu_link_content) in Condition.

🐛 Bug report
Status

Closed: works as designed

Version

1.4

Component

Code

Created by

🇮🇳India sumit.prajapati

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.

Production build 0.71.5 2024