Priority of type-specific over default patterns not preserved in D7 upgrade migration

Created on 2 February 2025, 22 days ago

Problem/Motivation

The d7_pathauto_patterns migration does not assign weights to migrated patterns. Therefore, if you have both a default pattern for an entity type (e.g. nodes) and one or more bundle-specific patterns for that type, you end up with configs like

  • pathauto.pattern.node
  • pathauto.pattern.node_some_type

When weights are all 0 (zero), I assume they are iterated alphabetically by machine-name, which means the default pattern will always be prioritised over the bundle-specific one(s).

Steps to reproduce

  1. Install pathauto on D7 site
  2. Configure a default pattern for all nodes
  3. Configure a different pattern for a specific content type
  4. Migrate d7_pathauto_patterns and the chosen node type to a D11 site
  5. Create a new node of the chosen type and witness it being assigned the node default alias.

Proposed resolution

This could be solved by assigning a positive weight to all default patterns (those with no bundle specified) in the migration.

🐛 Bug report
Status

Active

Version

1.13

Component

Code

Created by

🇬🇧United Kingdom headbank

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

Comments & Activities

Production build 0.71.5 2024