QUALITY PATCH

ACSD-45168: SEO-friendly URLs are not generated for products that have url_key attributes overridden…

SEO-friendly URLs are not generated for products that have url_key attributes overridden on the store-view level. Quality patch ACSD-45168 for magento/module-catalog-url-rewrite applies to Magento Open Source and Adobe Commerce 2.4.2 to 2.4.5-p17.

Categories
Catalog/Product
Components
magento/module-catalog-url-rewrite
Origin
adobe-commerce-support
Since QPT
1.1.24

Issue

SEO-friendly URLs are not generated for products that have url_key attributes overridden on the store-view level.

Steps to reproduce

1. Set the configuration as follows by going to the Commerce Admin > Stores > Settings > Configuration > Catalog > Search Engine Optimization: * Use Categories Path for Product URLs = Yes * Generate "category/product" URL Rewrites = Yes 1. Clean the configuration cache. 1. Create two categories: Category 1 and Category 2. 1. Create two products: Product 1 in Category 1, Product 2 in Category 1. 1. Change the scope to Default Store View for Product 1. 1. Uncheck the optional URL Key in Search Engine Optimization. 1. Save the product. 1. Switch back to All Store Views. 1. Add Product 1 to Category 2, and add Product 2 to Category 2. 1. Check the url_rewrite table or Marketing > SEO & Search > URL Rewrites.

Adobe's page lists 2.4.2 - 2.4.5-p1 as compatible; the versions below are resolved from the current QPT constraints and are the ones the tool will offer.

Adobe scheduled the permanent fix for 2.4.6.

Install

Install the Quality Patches Tool with composer require magento/quality-patches, apply the prerequisites listed for all files applicable to your distribution and version first, then run vendor/bin/magento-patches apply ACSD-45168. On Cloud, add ACSD-45168 under stage.build.QUALITY_PATCHES in .magento.env.yaml.

For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its ACSD-45168/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Bundle prerequisites the same way and list them first. Paths are relative to each package root, using the default -p1 level. Prefer local files when configuring composer-patches; a remote URL can change.

Patch files and compatible versions

Packages across compatible versions (1): magento/module-catalog-url-rewrite
Packages across compatible versions (1): magento/module-catalog-url-rewrite

Sources

Łukasz Bajsarowicz
Built by

Łukasz Bajsarowicz, e-commerce architect

Magento and Adobe Commerce architecture, upgrades, performance and audits for merchants and agencies since 2015; magento.watch is the tooling I use on those projects.

Open source, maintained on weekends.