-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Sets admin store code for admin area/controllers #21148
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
Sets admin store code for admin area/controllers #21148
Conversation
…xplicitly specified
|
Hi @rav-redchamps. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
…igured for MAGE_RUN_CODE then it will set non-admin store for backend
|
@magento-engcom-team seems like the Travis automated test is showing false fail. Kindly check and confirm. |
|
@rav-redchamps contributor is supposed to fix broken tests within a pull request. You may notice that two of three issues you mentioned where closed as |
|
Hi @rav-redchamps, thank you for your contribution! |
|
@orlangur sorry, but why you are so interested to close the issues/pull requests? 🤔 I have seen many valid issues/pull requests closed by you. Are you damn sure there is no issue this pull request is fixing? People reported the problem, someone made effort to fix it and you just closed it. Sorry if this all sounds rude. |
|
@rav-redchamps you can read all the details in issues closed. Valid issues should be fixed, random changes breaking some tests should not be merged. You can always share your thoughts for an issue/pull request which seems valid to you and it will be reopened. |
|
Well, in #12354 you only refer to the two other tickets. Ticket #3147 is closed by @hshar7 without a reason. And #12502 is closed due inactivity. But you may mean here that third party plugins use the wrong class
Strike that, that wasn't the solution. It made things worse. It made Magento think the backend was a store 0 with products and so on and was giving alot of other issues. I tried this piece of code for a referrer redirect to the url where the request came from, but this also results in a frontend url: |
Description (*)
\Magento\Store\Model\StoreManagerInterfacein the admin area was always returning details of Default store instead of the admin store.If you try below code in backend controller or any other file running for backend
You will get default store ID ideally 1 instead of admin store id ideally 0
So this pull request fixes this problem and set the admin store as a current store instead of the default store.
Fixed Issues (if relevant)
Manual testing scenarios (*)
$resultRedirect->setUrl($this->_redirect->getRefererUrl());from custom admin controller when admin panel has custom domain configured. Previously, it was redirecting to frontend but now it redirects back to referral admin URLContribution checklist (*)