From df2810678d6bee5bde73e8786c0db7fab8939b00 Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Mon, 2 Oct 2023 16:59:03 +0200 Subject: [PATCH] IBX-3957: Made NOP URL aliases reusable and original --- .../Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php | 2 +- eZ/Publish/Core/Persistence/Legacy/Content/UrlAlias/Handler.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/eZ/Publish/Core/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php b/eZ/Publish/Core/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php index 1e403b8967..87af06be01 100644 --- a/eZ/Publish/Core/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php +++ b/eZ/Publish/Core/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php @@ -603,7 +603,7 @@ public function insertRow(array $values): int $values['is_original'] = 1; } if ($values['action'] === self::NOP_ACTION) { - $values['is_original'] = 0; + $values['is_original'] = 1; } $query = $this->connection->createQueryBuilder(); diff --git a/eZ/Publish/Core/Persistence/Legacy/Content/UrlAlias/Handler.php b/eZ/Publish/Core/Persistence/Legacy/Content/UrlAlias/Handler.php index d9b8fc48c8..9b1da114f9 100644 --- a/eZ/Publish/Core/Persistence/Legacy/Content/UrlAlias/Handler.php +++ b/eZ/Publish/Core/Persistence/Legacy/Content/UrlAlias/Handler.php @@ -234,7 +234,6 @@ private function internalPublishUrlAliasForLocation( // 2. existing location or custom alias entry // 3. history entry if ( - $row['action'] === Gateway::NOP_ACTION || $row['action'] === $action || (int)$row['is_original'] === 0 ) {