-
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
REST-API locale is always default scope #19908
Comments
Hi @jwundrak. 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:
where @jwundrak do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @shikhamis11. Thank you for working on this issue.
|
@jwundrak I tried the same at magento 2.2 and 2.3 got the 2nd store locale |
@shikhamis11 Thank you for verifying the issue. Based on the provided information internal tickets |
@shikhamis11 the expected and actual result was mixed up. I edit the description |
@jwundrak yes you are right I tried with ar_SA and en_US (default) got the result |
@shikhamis11 what's with the patch in the gist. This resolves the error, but I don't know, if this way is good. |
@jwundrak I am not completely sure about the patch but if it fix the issue go for pull request |
I created a plugin using your fix as a workaround https://packagist.org/packages/xsarus/magento2-rest-api-locale |
Hi @jwundrak. Thank you for your report.
The fix will be available with the upcoming 2.3.2 release. |
Preconditions (*)
Steps to reproduce (*)
Actual result (*)
Output of the test module:
Expected result (*)
Output of the test module:
Possible solution
In
\Magento\Webapi\Controller\PathProcessor::process
I start an emulation of the locale:$this->localeResolver->emulate($this->storeManager->getStore()->getId());
. I'm not sure, if this is the correct way, but works here in 2.1 and 2.3: https://gist.github.com/jwundrak/11ea7ca0b5c6cea57d3b7c8133548634The text was updated successfully, but these errors were encountered: