Description
Preconditions and environment
- Magento 2.4.7-p3
When creating a product in Magento 2.4.7-p3 with a url_key containing a forward slash ("/"), such as "test/product-123", Magento automatically replaces the "/" with a hyphen ("-") upon saving the product. As a result, the URL becomes "test-product-123".
However, if a manual URL rewrite is created for the same product, it is possible to save the original URL format "test/product-123" through the rewrite. This inconsistency in behaviour between automatic URL key generation and manual URL rewrites can lead to confusion and potential issues with URL management.
Steps to reproduce
- Create a product in Magento 2.4.7-p3 with the url_key set to "test/product-123".
- Save the product.
- Observe that Magento replaces the "/" with "-", resulting in the URL "test-product-123".
- Create a manual from the Marketing > SEO & Search > URL rewrite for the same product and set the URL to "test/product-123".
- Save the rewrite and note that the original URL format "test/product-123" is now accepted.
Expected result
Magento should either consistently allow or disallow the use of forward slashes ("/") in url_key values across both automatic product saving and manual URL rewrites.
Actual result
Magento replaces "/" with "-" during product save but allows "/" in manual URL rewrites, leading to inconsistent URL handling.
Additional information
No response
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status