diff --git a/web/modules/custom/geo_upgrade/migrations/upgrade_d7_url_alias.yml b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_url_alias.yml new file mode 100644 index 0000000..79ed93b --- /dev/null +++ b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_url_alias.yml @@ -0,0 +1,64 @@ +langcode: en +status: true +dependencies: { } +id: upgrade_d7_url_alias +class: Drupal\migrate\Plugin\Migration +field_plugin_method: null +cck_plugin_method: null +migration_tags: + - 'Drupal 7' + - Content +migration_group: migrate_drupal_7_geo +label: 'URL aliases' +source: + plugin: d7_url_alias + constants: + slash: / +process: + source: + - + plugin: concat + source: + - constants/slash + - source + alias: + - + plugin: skip_on_match + source: alias + method: row + # Content that wasn't migrated so the alias won't be migrate either. + value: + - 'event/' # Content type Event + - 'issue/' # Taxonomy vocabulary Issue + - 'regular-contributors/' # Regular contributors + - 'geo-volume-2/' + - 'geo-volume-3/' + - 'geo-volume-1/' + - 'ad-groups' + - + plugin: concat + source: + - constants/slash + - alias + langcode: + - + plugin: get + source: language +# node_translation: +# - +# plugin: explode +# source: source +# delimiter: / +# - +# plugin: extract +# default: INVALID_NID +# index: +# - 1 +# - +# plugin: migration_lookup +# migration: { } +destination: + plugin: url_alias +migration_dependencies: + required: { } + optional: { } diff --git a/web/modules/custom/geo_upgrade/src/Plugin/migrate/process/SkipOnMatch.php b/web/modules/custom/geo_upgrade/src/Plugin/migrate/process/SkipOnMatch.php new file mode 100644 index 0000000..5726627 --- /dev/null +++ b/web/modules/custom/geo_upgrade/src/Plugin/migrate/process/SkipOnMatch.php @@ -0,0 +1,40 @@ +