Follow-up for #3009014: ensure migrations with PathAlias destinations run *after* locatable content entity type destinations

Created on 5 December 2019, over 5 years ago
Updated 24 May 2025, 11 days ago

Problem/Motivation

The d7_url_alias migration runs at an arbitrary time. This has been fine. Until recently

Recently, two things happened that make this problematic:

  1. It's now possible to enable validation for content entity type destinations #2745797: Add option to content entity destinations for validation
  2. Path aliases have been converted to entities: #3009014: Convert path alias migrations to use entity:path_alias destination and … added validation logic

Combined, this means that if you enable validation for content entity destinations (and you should — see #3095456: [Plan] Discuss strategy for long-term use of entity validation in the migration system ), the d7_url_alias migration runs at a time when usually no content entities have been migrated yet. Result: an enormous amount of validation errors for PathAlias entities.

Proposed resolution

Automatically enhance migrations with Path Alias entities as their destination (destination plugin entity:path_alias) to have optional dependencies on every migration that has a locatable content entity type as their destination (if it's not locatable, it can't have an URL, and there's no point in pushing Path Alias entity creation until later).

In Drupal core, this would affect the d6_url_alias and d7_url_alias migrations. But it would also automatically enhance contributed/custom migrations.

Remaining tasks

Review.

User interface changes

None. Other than: far fewer validation errors when validations are enabled.

API changes

None.

Data model changes

None.

Release notes snippet

N/A

🐛 Bug report
Status

Postponed

Version

11.0 🔥

Component

migration system

Created by

🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

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