Skip to content

Commit 8eb2152

Browse files
committed
MAGETWO-53342: Duplicating url keys on creating configurable product
1 parent 94ea6ec commit 8eb2152

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Store/Group.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ protected function generateProductUrls($websiteId, $originWebsiteId)
113113
$collection = $this->productFactory->create()
114114
->getCollection()
115115
->addCategoryIds()
116-
->addAttributeToSelect(['name', 'url_path', 'url_key'])
116+
->addAttributeToSelect(['name', 'url_path', 'url_key', 'visibility'])
117117
->addWebsiteFilter($websiteIds);
118118
foreach ($collection as $product) {
119119
/** @var \Magento\Catalog\Model\Product $product */

app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Store/View.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ protected function generateProductUrls($websiteId, $originWebsiteId, $storeId)
100100
$collection = $this->productFactory->create()
101101
->getCollection()
102102
->addCategoryIds()
103-
->addAttributeToSelect(['name', 'url_path', 'url_key'])
103+
->addAttributeToSelect(['name', 'url_path', 'url_key', 'visibility'])
104104
->addWebsiteFilter($websiteIds);
105105
foreach ($collection as $product) {
106106
$product->setStoreId($storeId);

0 commit comments

Comments
 (0)