-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMS Page with identifier shipping cannot save. The value specified in the URL Key field would generate a URL that already exists #35115
Comments
Hi @aliomattux. Thank you for your report.
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
For more details, review the Magento Contributor Assistant documentation. Add a comment to assign the issue: To learn more about issue processing workflow, refer to the Code Contributions.
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket. ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
Hi @engcom-Hotel. Thank you for working on this issue.
|
@magento give me 2.4-develop instance |
Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Hotel, here is your Magento Instance: https://2c8a342c3915f819f9d770eb549093b3.instances.magento-community.engineering |
Hello @aliomattux, Thanks for posting the issue! We have tried to reproduce the issue in the fresh installed Magento 2.4-develop branch. But for us, the issue is not reproducible. We are able to save the CMS block successfully. Please have a look at the below screenshot for reference: Let us know if we have missed anything. Thanks |
In my case I have to problem when I create a CMS page with URL key "newsletter". If I change the URL key to newsletter1 it works fine. |
@engcom-Hotel, I am having the issue with a CMS Page, with any duplicate URL for two different store's CMS Pages. This should not happen. Preconditions Steps to reproduce Expected result Actual result |
Hi @engcom-November. Thank you for working on this issue.
|
✅ Jira issue https://jira.corp.magento.com/browse/AC-2554 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-November. Thank you for verifying the issue. |
@magento I am working on this |
Hello @aliomattux i've try to reproduce issue in magento 2.4.3-p1. If you have cms page with url key like "shipping, cart, checkout" you will not be able to save it after migration because the validator of url key will find that there is frontend route "shipping, cart, checkout" defined from modules. diff --git a/vendor/magento/module-cms/Model/PageRepository.php b/vendor/magento/module-cms/Model/PageRepository.php
please check this and let me know if any issues. |
@pranav7870 Will this fix also fix the problem for ANY url key, not just "shipping, cart, checkout"? @engcom-November verified this as a bug further upthread. This happens when any CMS Page's url key matches another. (e.g "home", "distributors", "XYZ", etc. |
Hello @chardwick99 i've fix this for all urls please check with my code, please check and let me know. |
@pranav7870 I already know about the proposed "fix". This fix requires me to modify the core code. I reported this as a bug because of the industry standard use of the url key "shipping". As stated in my initial post, many popular ecommerce websites use the url. Additionally, Magento 2 has been operational for years and many ecommerce stores already make use of the url key shipping. Creating the requirement for customers to change the url IMO is a bug introduced. I do not expect it to be changed, but it should be. Therefore, I reject the proposal customers should have to modify their installation to bypass the issue. |
I have the same issue with route "klarna". After longer consideration that mechanism is not entirely bad, but should more accurate, for example these routes reserved by modules, are not fully occupied, for example 'klarna/index/index' is up for grabs. |
If certain page identifiers should be "reserved", their error message should be adapted and not direct in a direction of page identifier duplicates – which is also correct in some way but it won't help you finding the duplicate in your cms pages. |
This error is not due to specicif key reserved. To reproduce the bug you can do :
Here is the patch to fix the bug :
|
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
Description
This bug report is linked to bug: #31007 but is not the same issue.
It is easy to respond and say that Magento core has a frontName value of shipping and therefore, you cannot use ever the url key shipping.
In a rebuttal to such a general statement, shipping is one of the most popular and widely used urls. It is a url used by companies to explain shipping polciies. Several major websites worldwide use this url, and Magento is saying, you cannot use it.
This new validator did not exist in previous versions of Magento 2. In our case we have had since 2008 a url for /shipping. Now Magento decides to not allow it, that doesn't work. We are forced to override "woraround" the validator to update content to a page that cannot just be changed because Magento needs it.
The text was updated successfully, but these errors were encountered: