Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit f0be8db

Browse files
committed
GITHUB-8970: Cannot assign products to categories not under tree root.
1 parent 566cc7f commit f0be8db

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

app/code/Magento/CatalogUrlRewrite/Model/ProductScopeRewriteGenerator.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,7 @@ public function generateForSpecificStoreView($storeId, $productCategories, Produ
208208
public function isCategoryProperForGenerating(Category $category, $storeId)
209209
{
210210
$parentId = $category->getParentId();
211-
if (
212-
$parentId != Category::ROOT_CATEGORY_ID
213-
&& $parentId != Category::TREE_ROOT_ID
214-
) {
211+
if ($parentId != Category::ROOT_CATEGORY_ID && $parentId != Category::TREE_ROOT_ID) {
215212
list(, $rootCategoryId) = $category->getParentIds();
216213
return $rootCategoryId == $this->storeManager->getStore($storeId)->getRootCategoryId();
217214
}

0 commit comments

Comments
 (0)