MDVA-40537: Creating store view gives error when several CMS pages have same URL Key.
- Topics:
- CMS
CREATED FOR:
- Experienced
- Admin
The MDVA-40537 patch fixes the issue where users get an error when creating a store view if several CMS pages have the same URL key. This patch is available when the Quality Patches Tool (QPT) 1.1.4 is installed. The patch ID is MDVA-40537. Please note that the issue was fixed in Adobe Commerce 2.4.1.
Affected products and versions
The patch is created for Adobe Commerce version:
Adobe Commerce (all deployment methods) 2.3.5-p2
Compatible with Adobe Commerce versions:
Adobe Commerce (all deployment methods) 2.3.4 - 2.4.0-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
Users get an error when creating a store view if several CMS pages have the same URL key.
Steps to reproduce:
-
Go to the Admin Panel > Stores > All Stores and create two store views.
Name: German Code: german Status: Enabled
Name: French Code: french Status: Enabled
-
Go to the Admin Panel > Content > Pages and create two pages.
Page Title: About Us URL Key: about-us Store View: French
Page Title: About Us URL Key: about-us Store View: German
-
Go to the Admin Panel > Stores > All stores and create a new store view.
Name: Spanish Code: spanish Status: Enabled
Expected results:
Store view is created successfully.
Actual results:
The following error message is shown: Something went wrong while saving. Please review the error log. The log contains an exception like:
Exception message: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'about-us-4' for key 'URL_REWRITE_REQUEST_PATH_STORE_ID', query was: INSERT INTO }}url_rewrite{{ (}}redirect_type{{,}}is_autogenerated{{,}}metadata{{,}}description{{,}}store_id{{,}}entity_type{{,}}entity_id{{,}}request_path{{,}}target_path{{) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?)
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
To learn more about Quality Patches Tool, refer to:
- 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.
For info about other patches available in QPT, refer to the Patches available in QPT section.