node_type is removed in Drupal 10

Created on 16 January 2023, over 1 year ago
Updated 16 May 2023, over 1 year ago

Problem/Motivation

See #1932810: Add entity bundles condition plugin for entities with bundles , the node_type condition has been replaced by entity_bundle:node.

Steps to reproduce

Create menu position rules based on node type.
Upgrade to Drupal 10 (with patch from 📌 Automated Drupal 10 compatibility fixes Fixed ).
You get and exception:

The "node_type" plugin does not exist.

Proposed resolution

node_type should be replaced in code and in existing config.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇫🇷France prudloff Lille

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.

  • 🇨🇦Canada joelpittet Vancouver

    Oh thank you, that will help people transition! I hope to put this in 1.1

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Status changed to Fixed over 1 year ago
  • 🇨🇦Canada dadderley Vancouver

    Hi, I just came across this post.

    I was having this issue
    Drupal 10 updating issue - Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" plugin does not exist
    https://www.drupal.org/project/drupal/issues/3056633 💬 Drupal 10 updating issue - Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" plugin does not exist Needs work

    One of the posts there helped me

    I posted this on that thread
    https://www.drupal.org/project/drupal/issues/3056633#comment-15052222 💬 Drupal 10 updating issue - Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" plugin does not exist Needs work

    Thanks Anybody,
    The comment (137) by Anybody provided the solution.

    This was very frustrating.

    I was upgrading a site from Drupal 9.5.9 to Drupal 10.0.9
    No matter what I did, I kept getting the error below and WSOD on all content.

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

    I exported the config for the whole site.
    I searched for "node_type".

    There were 3 .yml files with "id node_type"

    • menu_position.menu_position_rule.member_location.yml
    • menu_position.menu_position_rule.news_item.yml
    • user.role.admin.yml

    I rolled back to original and got the site up again.

    I uninstalled Menu Position 8.x-1.0
    I uninstalled Automatic Entity Label 8.x-3.0

    I did the upgrade again ----- this time success - upgraded to Drupal 10.0.9 with no errors!!

    I reinstalled both modules and it still worked.

    I exported the config from the upgraded Drupal 10.0.9 site.
    I searched for "node_type".
    There were no .yml files with "id node_type"

    Hopefully this may help someone else.

Production build 0.71.5 2024