Skip to content

Commit 3a06060

Browse files
committed
Fixed issue of url_key and url rewrites regeneration based on product name value.
1 parent 2a13b5f commit 3a06060

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Model/RegenerateProductRewrites.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public function processProduct($entity, $storeId = 0)
184184
}
185185

186186
if (!$this->regenerateOptions['noRegenUrlKey']) {
187-
$generatedKey = $this->_getProductUrlPathGenerator()->getUrlKey($entity);
187+
$generatedKey = $this->_getProductUrlPathGenerator()->getUrlKey($entity->setUrlKey(null));
188188
$this->_getProductAction()->updateAttributes(
189189
[$entity->getId()],
190190
['url_path' => null, 'url_key' => $generatedKey],

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Add into Magento 2 a CLI feature which allow to regenerate a Url rewrites of products and categories",
44
"keywords": ["magento", "magento2 extension", "magento 2 extension", "extension", "module", "magento2 module", "magento 2 module"],
55
"type": "magento2-module",
6-
"version": "1.5.0",
6+
"version": "1.5.1",
77
"homepage": "https://github.com/olegkoval/magento2-regenerate_url_rewrites",
88
"authors": [
99
{

etc/module.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
-->
1212
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
13-
<module name="OlegKoval_RegenerateUrlRewrites" setup_version="1.5.0">
13+
<module name="OlegKoval_RegenerateUrlRewrites" setup_version="1.5.1">
1414
<sequence>
1515
<module name="Magento_Store"/>
1616
<module name="Magento_Catalog"/>

0 commit comments

Comments
 (0)