diff --git a/Block/Configuration.php b/Block/Configuration.php index f788e5473..8d8be8b1d 100755 --- a/Block/Configuration.php +++ b/Block/Configuration.php @@ -27,7 +27,7 @@ public function isSearchPage(): bool if ($this->getConfigHelper()->replaceCategories() && $request->getControllerName() === 'category') { $category = $this->getCurrentCategory(); - if ($category && $category->getDisplayMode() !== 'PAGE') { + if ($category->getId() && $category->getDisplayMode() !== 'PAGE') { return true; } } @@ -125,7 +125,7 @@ public function getConfiguration() && $request->getControllerName() === 'category') { $category = $this->getCurrentCategory(); - if ($category && $category->getDisplayMode() !== 'PAGE') { + if ($category->getId() && $category->getDisplayMode() !== 'PAGE') { $category->getUrlInstance()->setStore($this->getStoreId()); if (self::IS_CATEGORY_NAVIGATION_ENABLED) { $childCategories = $this->getChildCategoryUrls($category);