Skip to content

Commit

Permalink
Closes #2264 Migrate path aliases for nodes if they exist, otherwise …
Browse files Browse the repository at this point in the history
…turn on Pathauto. (#2281)

Co-authored-by: Joe Parsons <[email protected]>
  • Loading branch information
trackleft and joeparsons authored Mar 29, 2023
1 parent 9a75b4c commit 6e5c21d
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 73 deletions.
25 changes: 13 additions & 12 deletions modules/custom/az_migration/migrations/az_node_carousel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,19 @@ process:
changed: changed
promote: promote
sticky: sticky

path/pathauto:
-
plugin: skip_on_empty
- plugin: str_replace
source: alias
method: process
-
plugin: default_value
default_value: 0

path/alias:
-
plugin: skip_on_empty
regex: true
search: /.$/
replace: 0
- plugin: default_value
source: alias
method: process
default_value: 1
strict: true
- plugin: callback
callable: intval
path/alias:
plugin: skip_on_empty
source: alias
method: process
24 changes: 14 additions & 10 deletions modules/custom/az_migration/migrations/az_node_event.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,18 +189,22 @@ process:
changed: changed
promote: promote
sticky: sticky

path/pathauto:
-
plugin: skip_on_empty
- plugin: str_replace
source: alias
method: process
-
plugin: default_value
default_value: 0

path/alias: alias

regex: true
search: /.$/
replace: 0
- plugin: default_value
source: alias
default_value: 1
strict: true
- plugin: callback
callable: intval
path/alias:
plugin: skip_on_empty
source: alias
method: process
field_az_event_category:
-
plugin: migration_lookup
Expand Down
26 changes: 13 additions & 13 deletions modules/custom/az_migration/migrations/az_node_flexible_page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,22 @@ process:
changed: changed
promote: promote
sticky: sticky

path/pathauto:
-
plugin: skip_on_empty
- plugin: str_replace
source: alias
method: process
-
plugin: default_value
default_value: 0

path/alias:
-
plugin: skip_on_empty
regex: true
search: /.$/
replace: 0
- plugin: default_value
source: alias
method: process

default_value: 1
strict: true
- plugin: callback
callable: intval
path/alias:
plugin: skip_on_empty
source: alias
method: process
field_az_page_category:
-
plugin: migration_lookup
Expand Down
25 changes: 13 additions & 12 deletions modules/custom/az_migration/migrations/az_node_news.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,18 +283,19 @@ process:
changed: changed
promote: promote
sticky: sticky

path/pathauto:
-
plugin: skip_on_empty
- plugin: str_replace
source: alias
method: process
-
plugin: default_value
default_value: 0

path/alias:
-
plugin: skip_on_empty
regex: true
search: /.$/
replace: 0
- plugin: default_value
source: alias
method: process
default_value: 1
strict: true
- plugin: callback
callable: intval
path/alias:
plugin: skip_on_empty
source: alias
method: process
26 changes: 13 additions & 13 deletions modules/custom/az_migration/migrations/az_node_person.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,22 +181,22 @@ process:
changed: changed
promote: promote
sticky: sticky

path/pathauto:
-
plugin: skip_on_empty
- plugin: str_replace
source: alias
method: process
-
plugin: default_value
default_value: 0

path/alias:
-
plugin: skip_on_empty
regex: true
search: /.$/
replace: 0
- plugin: default_value
source: alias
method: process

default_value: 1
strict: true
- plugin: callback
callable: intval
path/alias:
plugin: skip_on_empty
source: alias
method: process
field_az_person_category:
-
plugin: migration_lookup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,22 @@ process:
changed: changed
promote: promote
sticky: sticky

path/pathauto:
-
plugin: skip_on_empty
- plugin: str_replace
source: alias
method: process
-
plugin: default_value
default_value: 0

path/alias:
-
plugin: skip_on_empty
regex: true
search: /.$/
replace: 0
- plugin: default_value
source: alias
method: process

default_value: 1
strict: true
- plugin: callback
callable: intval
path/alias:
plugin: skip_on_empty
source: alias
method: process
field_az_main_content/target_id:
-
plugin: migration_lookup
Expand Down

0 comments on commit 6e5c21d

Please sign in to comment.