Skip to content

Commit 96be1ce

Browse files
committed
[BUGFIX] Flat Category reindexList of AllChildren if the url_key of the current category has changed
1 parent 8d7aab7 commit 96be1ce

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/code/Magento/Catalog/Model/Category.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,9 @@ public function reindex()
10901090
$flatIndexer = $this->indexerRegistry->get(Indexer\Category\Flat\State::INDEXER_ID);
10911091
if (!$flatIndexer->isScheduled()) {
10921092
$flatIndexer->reindexRow($this->getId());
1093+
if ($this->dataHasChangedFor('url_key')) {
1094+
$flatIndexer->reindexList(explode(',', $this->getAllChildren()));
1095+
}
10931096
}
10941097
}
10951098
$productIndexer = $this->indexerRegistry->get(Indexer\Category\Product::INDEXER_ID);

0 commit comments

Comments
 (0)