diff --git a/core/modules/migrate_drupal/tests/fixtures/drupal6.php b/core/modules/migrate_drupal/tests/fixtures/drupal6.php index 9334ac0142..2ecce6979e 100644 --- a/core/modules/migrate_drupal/tests/fixtures/drupal6.php +++ b/core/modules/migrate_drupal/tests/fixtures/drupal6.php @@ -46583,6 +46583,12 @@ 'dst' => 'the-zulu-people', 'language' => 'en', )) +->values(array( + 'pid' => '8', + 'src' => 'admin', + 'dst' => 'noslash', + 'language' => '', +)) ->execute(); $connection->schema()->createTable('users', array( diff --git a/core/modules/path/migrations/d6_url_alias.yml b/core/modules/path/migrations/d6_url_alias.yml index fcf2036405..c5d793411e 100644 --- a/core/modules/path/migrations/d6_url_alias.yml +++ b/core/modules/path/migrations/d6_url_alias.yml @@ -27,6 +27,7 @@ process: delimiter: / - plugin: extract + default: 'INVALID_NID' index: - 1 - diff --git a/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php b/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php index 092d5ac82d..2fb27a7b15 100644 --- a/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php +++ b/core/modules/path/tests/src/Kernel/Migrate/d6/MigrateUrlAliasTest.php @@ -103,6 +103,14 @@ public function testUrlAlias() { ]; $path = \Drupal::service('path.alias_storage')->load($conditions); $this->assertPath('3', $conditions, $path); + + $path = \Drupal::service('path.alias_storage')->load(['alias' => '/noslash']); + $conditions = [ + 'source' => '/admin', + 'alias' => '/noslash', + 'langcode' => 'und', + ]; + $this->assertPath('2', $conditions, $path); } /**