Pathauto leaves invalid config when updating to Drupal 10

Created on 9 December 2023, 7 months ago
Updated 14 December 2023, 7 months ago

Problem/Motivation

node_type is removed as a valid configuration option from Drupal 10. entity:bundle should be used instead.

When updating pathauto to a Drupal 10 compatible version this config is not checked or updated.

Steps to reproduce

Install old version of pathauto (not sure how far back)
Create path rules
Update to the newest version of pathauto
Run db updates
Update site to Drupal 10
Try to run config import you will receive the following error: "Drupal\Component\Plugin\Exception\PluginNotFoundException: The "node_type" plugin does not exist."

Proposed resolution

Add update hook that checks for this invalid config and updates it.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States nicxvan

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

Comments & Activities

  • Issue created by @nicxvan
  • First commit to issue fork.
  • πŸ‡©πŸ‡ͺGermany onfire84

    Hi, i ran into the same issue this week and will try to write a patch for that.

  • Status changed to Fixed 7 months ago
  • πŸ‡¨πŸ‡­Switzerland Berdir Switzerland

    pathauto_update_8108() exists to fix that.

    If you still have this issue then you either have/had default config that you hadn't updated that was installed after that update did run or re-imported fixed configuration after running updates.

    I don't think it's necessary or useful to include that again.

  • πŸ‡©πŸ‡ͺGermany onfire84

    I did rerun the hook and exportet the config changes again. Seams to be fixed.

  • Status changed to Needs review 7 months ago
  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    I think it might be useful to include again since I've had four or five projects that ran into it. There is also a core issue that people respond to needing to fix it manually fairly often:

    https://www.drupal.org/project/drupal/issues/3356728 πŸ’¬ The "node_type" plugin does not exist - upgrade from D9 to D10 Closed: cannot reproduce

    In my case for all sites it's always pathauto with the error so addressing that at the root would be nice.

  • Status changed to Active 7 months ago
  • πŸ‡¨πŸ‡­Switzerland Berdir Switzerland

    If someone writes a patch/MR for that then fine, the main issue here is that we need to educate, or better enforce, correct handling of config after updates, which is that config must always be exported after running updates. The second reason this happens is default config in modules and install profiles on sites that were installed after the previous update did run.

Production build 0.69.0 2024