diff --git a/CHANGELOG.md b/CHANGELOG.md index 961fd6a1..9e5088cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -374,3 +374,6 @@ * Fix Magento Framework dependency in composer.json * Fix advanced filter error when left empty * Improve URL generation requests for product job + +### Version 103.0.8 : +* Fix URL rewrite generation when multiple url keys are duplicated diff --git a/Helper/Import/Product.php b/Helper/Import/Product.php index 33476b1e..b88e48c7 100755 --- a/Helper/Import/Product.php +++ b/Helper/Import/Product.php @@ -569,7 +569,7 @@ public function verifyProductUrl($requestPath, $product) $product->setUrlKey($product->getUrlKey() . '-' . $suffix); } if ($suffix >= 2) { - $product->setUrlKey(substr($product->getUrlKey(), 0, -(strlen($suffix - 1) + 1)) . '-' . $suffix); + $product->setUrlKey(substr($product->getUrlKey(), 0, -(strlen((string)($suffix - 1)) + 1)) . '-' . $suffix); } /** @var string $requestPath */ $requestPath = $this->productUrlPathGenerator->getUrlPathWithSuffix( diff --git a/composer.json b/composer.json index a8e5a93d..bd32a778 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "nyholm/psr7": "^1.5" }, "type": "magento2-module", - "version": "103.0.7", + "version": "103.0.8", "license": [ "OSL-3.0", "AFL-3.0"