Commit 17a47b8e authored by alexpott's avatar alexpott

Issue #2927227 by Jo Fitzgerald, Olarin, ao2, quietone, heddn: d6_url_alias...

Issue #2927227 by Jo Fitzgerald, Olarin, ao2, quietone, heddn: d6_url_alias migration fails when the src path in D6 contains no slashes
parent a2616738
......@@ -46591,6 +46591,12 @@
'dst' => 'the-zulu-people',
'language' => 'en',
))
->values(array(
'pid' => '8',
'src' => 'admin',
'dst' => 'source-noslash',
'language' => '',
))
->execute();
$connection->schema()->createTable('users', array(
......@@ -26,7 +26,9 @@ process:
source: src
delimiter: /
-
# If the source path has no slashes return a dummy default value.
plugin: extract
default: 'INVALID_NID'
index:
- 1
-
......
......@@ -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' => '/source-noslash']);
$conditions = [
'source' => '/admin',
'alias' => '/source-noslash',
'langcode' => 'und',
];
$this->assertPath('2', $conditions, $path);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment