The "node_type" plugin does not exist.

Created on 13 October 2023, about 1 year ago
Updated 23 October 2023, about 1 year ago

I am getting the following error while updating core from Drupal 9 to Drupal 10. I think node_type is removed from Drupal 10.
I have updated my Drupal 9 site to Drupal 10 with Composer. I have fixed the issues related to some modules and themes and updated the database using the "drush updatedb" command and the database is also updated without any issues. But when I open my site it shows the following error, my verbose is enabled and showing the error below.

I've also done some research a bit and found that node_type is removed from Drupal 10 and instead, we write entity_bundle:node. But I have searched my whole codebase and found that "node_type" is used in two twig files of my custom theme. I have also tried by replacing the "node_type" with "entity_bundle:node" in my custom themes twig file but it didn't solve the issue. Can anyone help on this?

Error:-

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

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "node_type" plugin does not exist. Valid plugin IDs for Drupal\Core\Condition\ConditionManager are: condition_group, language, current_theme, request_path, user_role, webform, entity_bundle:block_content, entity_bundle:comment, entity_bundle:contact_message, entity_bundle:crop, entity_bundle:media, entity_bundle:node, entity_bundle:paragraph, entity_bundle:redirect, entity_bundle:shortcut, entity_bundle:taxonomy_term, entity_bundle:webform_submission, entity_bundle:menu_link_content in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).

Drupal\Core\Plugin\DefaultPluginManager->getDefinition() (Line: 16)
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance() (Line: 59)
Drupal\Core\Condition\ConditionManager->createInstance() (Line: 81)
Drupal\Core\Plugin\DefaultLazyPluginCollection->initializePlugin() (Line: 80)
Drupal\Component\Plugin\LazyPluginCollection->get() (Line: 26)
Drupal\Core\Condition\ConditionPluginCollection->get() (Line: 149)
Drupal\Component\Plugin\LazyPluginCollection->getIterator() (Line: 87)
Drupal\block_visibility_groups\GroupEvaluator->applyContexts() (Line: 64)
Drupal\block_visibility_groups\GroupEvaluator->evaluateGroup() (Line: 69)
Drupal\block_visibility_groups\Plugin\Condition\ConditionGroup->evaluate() (Line: 68)
Drupal\Core\Condition\ConditionManager->execute() (Line: 84)
Drupal\Core\Condition\ConditionPluginBase->execute() (Line: 26)
Drupal\block\BlockAccessControlHandler->resolveConditions() (Line: 116)
Drupal\block\BlockAccessControlHandler->checkAccess() (Line: 105)
Drupal\Core\Entity\EntityAccessControlHandler->access() (Line: 314)
Drupal\Core\Entity\EntityBase->access() (Line: 63)
Drupal\block\BlockRepository->getVisibleBlocksPerRegion() (Line: 137)
Drupal\block\Plugin\DisplayVariant\BlockPageVariant->build() (Line: 270)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare() (Line: 128)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 187)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 50)
Drupal\ban\BanMiddleware->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)

🐛 Bug report
Status

Active

Component

Code

Created by

🇳🇵Nepal Tek Raj Bhatt

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

Comments & Activities

Production build 0.71.5 2024