-
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
Magento 2 Store Code validation regex: doesn't support uppercase letters in scope code #25668
Comments
Hi @attheCube. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @attheCube do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
@magento give me 2.3-develop instance |
Hi @AnnaShepa. Thank you for your request. I'm working on Magento 2.3-develop instance for you |
Hi @AnnaShepa. Thank you for working on this issue.
|
Hi @AnnaShepa, here is your Magento instance. |
Hi, The error message is thrown in the following files:
The regular expression in these files does not allow uppercase characters. It seems that this validation functionality is not used for saving scopes and using store codes in url, but it is used for the config-command and may be for setting store-codes via environment variables also. |
✅ Confirmed by @AnnaShepa Issue Available: @AnnaShepa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
@attheCube thank you for update, I managed to reproduce it as well |
Hi @sargan89. Thank you for working on this issue.
|
Hi @Usik2203. Thank you for working on this issue.
|
Hi @attheCube @Usik2203, Changing of this behavior could negatively affect some merchants, but I can't see any reason why we do need to change it, except just because we want to. |
Hi @engcom-Delta. Thank you for working on this issue.
|
✅ Confirmed by @engcom-Delta Issue Available: @engcom-Delta, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions! |
Unfortunately, we are archiving this ticket now as it did not get much attention from both Magento Community and Core developers for an extended period. This is done in an effort to create a quality, community-driven backlog which will allow us to allocate the required attention more easily. Please feel free to comment or reopen according to the Issue reporting guidelines |
Preconditions (*)
Steps to reproduce (*)
=> bin/magento config:show --scope=store --scope-code=de_AT
Expected result (*)
Actual result (*)
"The scope code can include only lowercase letters (a-z), numbers (0-9) and underscores (_). Also, the first character must be a letter."
Similar report: #11996
This report resulted in adjustment of the error message because the former reporter had no good reason.
One good reason why it should be possible to use uppercase letters in store code, is to differentiate regions in store code. Especially for using storecodes within url.
So you could use at least 'de_DE', 'de_AT', 'en_US' or 'en_UK' as store codes, which is very useful in urls.
To be RFC 4646 (https://tools.ietf.org/html/rfc4646) conform, there has to be the possibility to use hyphens for store codes, too.
Surely it would be possible to do something weird by having this possibility, but that lies in the responsibility of the projects lead.
Additonal information:
See comment
The text was updated successfully, but these errors were encountered: