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
[2.1] Unable to get store URL from admin #5322
Comments
I have the same issue on Magento 2.1.3 |
Same problem here, up |
Solution (in controller): |
I use it in a class who extends AbstractHelper so i used _urlBuilder like this instead of StoreManagerInterface :
thx @sfedosimov |
Still an issue as of 2.1.4. In the backend, I get the store from a particular order, and then try to generate a URL for that store:
Expected: I find that sometimes if I flush the cache, I get the correct URL, but after a while, it returns to the incorrect backend URL. |
A workaround to get a frontend URL for a store in the backend: See how Magento is generating the "View" link in the CMS page admin grid via its page actions: In the CMS module's
If you don't do this, no matter how you pass it the proper scope, it always resets that scope after getting the base URL. Not good. Anyhow, I was able to get it working then by doing what |
@acharrex, thank you for your report. |
I found an issue in magento 2 that it does not load get store URL when cache is enabled . that I am working on magento 2 and my cache is disabled and its working properly but if i enable cache then It redirect to store id 1 always and i did not found my store URL |
@magento I am working on it |
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! |
Preconditions (*)
Magento 2.4-develop
Steps to reproduce (*)
develop
branch.Expected result (*)
Actual result (*)
Magento returns an URL prefixed with the admin path:
Note
The following code:
Works correctly:
This problem seems to be limited to the "getUrl" method.
This issue was not present with Magento 2.0.7.
The text was updated successfully, but these errors were encountered: