-
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 sometimes doesn't select the correct store if the scope code is null #16298
Magento sometimes doesn't select the correct store if the scope code is null #16298
Conversation
…Code parameter then the scopeCode is changed after its evaluation so that the resolvedScopeCodes[$scopeType] array never has a null key value.
Hi @fratob85. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Hi @fratob85 , looks like your commit was pushed with the different email. Please, make the new commit with email used for your GitHub account or add email from the commit to your profile. |
Hi @sidolov, I just added and verified the correct email to my profile. |
#khcd2018 |
Close as duplicate to #18820 |
Description:
The method
resolve()
of the classMagento/framework/App/Config/ScopeCodeResolver
doesn't select the correct store if the$scopeCode
parameter in null on multi-store sites. In this case the value is retrieved with the wrong$scopeCode
value.Preconditions:
Magento v. 2.2.x or 2.3dev
Expected result:
The site switch to correct store in any cases.
Current result:
When the resolve method is called with null value then the
resolvedScopeCodes[$scopeType]
array gets an entry with null key wich has the resolved scope as value. If then the scope is switched and the resolve method is again called with null value then the value returned is not correct. This has been seen happening by us randomly in store language resolution.Proposed solution:
If the store code of the method
resolve()
is called with anull
scopeCode
parameter then thescopeCode
is changed after its evaluation so that theresolvedScopeCodes[$scopeType]
array never has a null key value.