Skip to content
Snippets Groups Projects
Commit 0e17d978 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #1160764 by Désiré, Dave Reid, SebCorbin, agentrickard: Fixed URL alias...

Issue #1160764 by Désiré, Dave Reid, SebCorbin, agentrickard: Fixed URL alias load is inconsistent if there are more then one aliases.
parent 8dfea8ef
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -92,6 +92,8 @@ public function load($conditions) {
}
return $select
->fields('url_alias')
->orderBy('pid', 'DESC')
->range(0, 1)
->execute()
->fetchAssoc();
}
......
......@@ -50,6 +50,10 @@ function testCRUD() {
$this->assertEqual($loadedAlias, $alias, format_string('Loaded the expected path with pid %pid.', array('%pid' => $pid)));
}
// Load alias by source path.
$loadedAlias = $aliasStorage->load(array('source' => 'node/1'));
$this->assertEqual($loadedAlias['alias'], 'alias_for_node_1_und', format_string('The last created alias loaded by default.'));
//Update a few aliases
foreach ($aliases as $alias) {
$fields = $aliasStorage->save($alias['source'], $alias['alias'] . '_updated', $alias['langcode'], $alias['pid']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment