Problem/Motivation
When one wants to do a partial site migrations (e.g. migrate node articles only, but nothing else), it would be nice to provide an option for migrating only those path redirects which destination is an article node.
Proposed resolution
Derive path redirect migrations per entity type (and bundle), at least for nodes and taxonomy terms.
Remaining tasks
TBD.
User interface changes
TBD.
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | interdiff-11-13.txt | 1.31 KB | karlshea |
| #13 | redirect-derive_redirect_migrations_per_entity_type-3162128-13.patch | 35.65 KB | karlshea |
| #5 | interdiff.txt | 713 bytes | wim leers |
| #2 | redirect-derive_redirect_migrations_per_entity_type-3162128-2--fix-only.patch | 33.28 KB | huzooka |
Comments
Comment #2
huzookaComment #3
huzookaComment #4
wim leers👍 This follows exactly the same pattern as #3122649: [PP-2] Derive path alias migrations per entity type (and bundle).
👍 Manually tested, works great!
🤓 Übernit: s/url/URL/
👍 Identical to
_path_get_source_drupal_instance_version()in #3122649: [PP-2] Derive path alias migrations per entity type (and bundle).👍 The changes here are identical to those in #3122649: [PP-2] Derive path alias migrations per entity type (and bundle)'s
UrlAlias.👍 This file uses the exact same pattern as #3122649: [PP-2] Derive path alias migrations per entity type (and bundle)'s
D7PathAliasDeriver.Comment #5
wim leersWhile manually testing this in more detail, I encountered some detailed quirks with big consequences:
🤔 Why the dependency on
d7_user_role? A dependency ond7_url_aliasI could understand, but not this.A hard dependency on
d7_usercan lead to a circular dependency: if thed7_usermigration depends on for example ad7_taxonomy_termmigration, which in turn contains path aliases and redirects …Yes, this is only theoretical.
But what's worse is that this means that every set of migration plugins that together migrate an entire entity type/bundle will end up depending on the
d7_usermigration, even if that entity (and its migration) itself does not depend on theUserentity type!🤓 But … wouldn't a
migration_lookupfor theuidind7_path_redirectprevent that problem from occurring at all?This reroll addresses both remarks.
Comment #6
wim leersNow with #3190815: Source count caching broken: impossible to enable source count caching for SqlBase-based source plugins (plus, unneeded cache I/O), a better/simpler approach is possible: let the migration system's built-in source count caching take care of this!
Comment #7
wim leersComment #8
wim leersOops, this is not postponed on that!
Comment #9
wim leersSibling comment to #3122649-41: [PP-2] Derive path alias migrations per entity type (and bundle):
Comment #10
wim leersOMG d.o you drunk
Comment #11
wim leersComment #12
wim leers#3190815: Source count caching broken: impossible to enable source count caching for SqlBase-based source plugins (plus, unneeded cache I/O) landed! 🥳Re-testing.
Comment #13
karlsheaThis is trying to be too clever:
If any of those keys are set, but null, it fails to create the empty arrays.