diff --git a/core/lib/Drupal/Core/Path/AliasStorage.php b/core/lib/Drupal/Core/Path/AliasStorage.php index db05fbbdfd..a1ac854b4e 100644 --- a/core/lib/Drupal/Core/Path/AliasStorage.php +++ b/core/lib/Drupal/Core/Path/AliasStorage.php @@ -134,7 +134,7 @@ public function load($conditions) { if (is_array($value)) { $group = $select->orConditionGroup(); foreach ($value as $item) { - $select->condition($field, $this->connection->escapeLike($item), 'LIKE'); + $group->condition($field, $this->connection->escapeLike($item), 'LIKE'); } $select->condition($group); } diff --git a/core/modules/path/tests/src/Functional/PathContentModerationTest.php b/core/modules/path/tests/src/Functional/PathContentModerationTest.php index f9ca4f2d84..05272c3475 100644 --- a/core/modules/path/tests/src/Functional/PathContentModerationTest.php +++ b/core/modules/path/tests/src/Functional/PathContentModerationTest.php @@ -88,7 +88,7 @@ public function testNodePathAlias() { $this->assertSession()->fieldValueEquals('path[0][alias]', '/revision-three'); $this->drupalPostForm('node/' . $node->id() . '/edit', [ 'title[0][value]' => 'revision four', - 'path[0][alias]' => '/revision-four', + 'path[0][alias]' => '', ], t('Save and Create New Draft')); // The first two aliases should still work, and the revision with no alias