Follow-up to #2226455: Migrated URL aliases not working until nodes are re-saved

+++ b/core/modules/path/migration_templates/d6_url_alias.yml
@@ -17,6 +17,9 @@ process:
+  langcode:
+    plugin: d6_url_alias_language
+    source:
+      - language

+++ b/core/modules/path/src/Plugin/migrate/process/d6/UrlAliasLanguage.php
@@ -0,0 +1,33 @@
+  public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
+    $language = reset($value);

Oops! anavarre picked this up, there's no reason for the source value to be an array... we should be able to specify the YAML as

source: language

but the reset() complains.

CommentFileSizeAuthor
migrated_url_aliases-2226455-38.patch1.21 KBmikeryan

Comments

mikeryan created an issue. See original summary.

quietone’s picture

Status: Needs review » Reviewed & tested by the community

Absolutely.

alexpott’s picture

Category: Bug report » Task
Status: Reviewed & tested by the community » Fixed

Not sure that this is a bug it is just a changed implementation - right?

Committed c389a07 and pushed to 8.0.x and 8.1.x. Thanks!

  • alexpott committed 49d199b on 8.1.x
    Issue #2671946 by mikeryan: d6_url_alias_language should accept language...

  • alexpott committed c389a07 on 8.0.x
    Issue #2671946 by mikeryan: d6_url_alias_language should accept language...
quietone’s picture

Issue tags: +migrate-d6-d8

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.