ACSD-45168: SEO-friendly URLs not generated for products that have url_key attributes overridden
The ACSD-45168 patch fixes the issue where SEO-friendly URLs are not generated for products that have url_key attributes overridden on the store-view level. This patch is available when the Quality Patches Tool (QPT) 1.1.24 is installed. The patch ID is ACSD-45168. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.4.6.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.5
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.4.2 - 2.4.5-p1
magento/quality-patches
package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.Issue
SEO-friendly URLs are not generated for products that have url_key attributes overridden on the store-view level.
Steps to reproduce:
-
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
-
Clean the configuration cache.
-
Create two categories: Category 1 and Category 2.
-
Create two products: Product 1 in Category 1, Product 2 in Category 1.
-
Change the scope to Default Store View for Product 1.
-
Uncheck the optional URL Key in Search Engine Optimization.
-
Save the product.
-
Switch back to All Store Views.
-
Add Product 1 to Category 2, and add Product 2 to Category 2.
-
Check the
url_rewrite
table or Marketing > SEO & Search > URL Rewrites.
Expected results:
The SEO-friendly URL for Category 2 is created for Product 1.
Actual results:
The SEO-friendly URL for Category 2 is missing for Product 1 because it had the URL key attribute overwritten for the store view scope.
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- Adobe Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide
Related reading
- Quality Patches Tool released: a new tool to self-serve quality patches in the support knowledge base
- Check if patch is available for your Adobe Commerce issue using Quality Patches Tool in the Quality Patches Tool guide
- Best practices for modifying database tables in the Commerce Implementation Playbook
For info about other patches available in QPT, refer to Quality Patches Tool: Search for patches in the Quality Patches Tool guide.