Skip to content

Commit 795bc1f

Browse files
committed
Merge remote-tracking branch 'upstream/2.3-develop' into 2.3.0-release-sync
1 parent 21bfed0 commit 795bc1f

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

app/code/Magento/CatalogImportExport/Model/Import/Product/CategoryProcessor.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,22 +115,14 @@ protected function createCategory($name, $parentId)
115115
if (!($parentCategory = $this->getCategoryById($parentId))) {
116116
$parentCategory = $this->categoryFactory->create()->load($parentId);
117117
}
118-
119-
// Set StoreId to 0 to generate URL Keys global and prevent generating url rewrites just for default website
120-
$category->setStoreId(0);
121118
$category->setPath($parentCategory->getPath());
122119
$category->setParentId($parentId);
123120
$category->setName($this->unquoteDelimiter($name));
124121
$category->setIsActive(true);
125122
$category->setIncludeInMenu(true);
126123
$category->setAttributeSetId($category->getDefaultAttributeSetId());
127-
try {
128-
$category->save();
129-
$this->categoriesCache[$category->getId()] = $category;
130-
} catch (\Exception $e) {
131-
$this->addFailedCategory($category, $e);
132-
}
133-
124+
$category->save();
125+
$this->categoriesCache[$category->getId()] = $category;
134126
return $category->getId();
135127
}
136128

0 commit comments

Comments
 (0)