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:
- It's now possible to enable validation for content entity type destinations #2745797: Add option to content entity destinations for validation
- 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