From 566dd105b37416aa2b843de9c6eed93e13e47a10 Mon Sep 17 00:00:00 2001 From: Jacek Foremski Date: Mon, 15 Jan 2018 13:07:53 +0100 Subject: [PATCH] Fix EZP-28740: RegenerateUrlAliasesCommand sometimes generates alias with wrong parent (0) (#2220) --- .../Command/LegacyStorage/RegenerateUrlAliasesCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eZ/Bundle/EzPublishMigrationBundle/Command/LegacyStorage/RegenerateUrlAliasesCommand.php b/eZ/Bundle/EzPublishMigrationBundle/Command/LegacyStorage/RegenerateUrlAliasesCommand.php index 4341b46162..46350f8938 100644 --- a/eZ/Bundle/EzPublishMigrationBundle/Command/LegacyStorage/RegenerateUrlAliasesCommand.php +++ b/eZ/Bundle/EzPublishMigrationBundle/Command/LegacyStorage/RegenerateUrlAliasesCommand.php @@ -259,7 +259,7 @@ protected function doBackupCustomLocationAliases() ->from('ezcontentobject_tree') ->where($queryBuilder->expr()->neq('node_id', 1)) ->orderBy('depth', 'ASC') - ->orderBy('node_id', 'ASC'); + ->addOrderBy('node_id', 'ASC'); $this->output->writeln("Backing up custom URL alias(es) for {$totalCount} Location(s)."); @@ -586,7 +586,7 @@ protected function doGenerateLocationAliases() ->from('ezcontentobject_tree') ->where($queryBuilder->expr()->neq('node_id', 1)) ->orderBy('depth', 'ASC') - ->orderBy('node_id', 'ASC'); + ->addOrderBy('node_id', 'ASC'); $this->output->writeln( "Publishing URL aliases for {$totalLocationCount} Location(s) " .