-
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
Store switch endless loop, wrong navigation block content (wrong store) with multidomain/language setup #3676
Comments
I figured out a modification which fixes the problem of endless redirects / wrong redirects. Solution would be to override the cookie value in pub/index.php |
Have the same issue on a sub-domain multi stores. When browsing the stores, just by typing in the URL, without using the switcher, there is no problem. |
Having the same issue on a simple one website 2 stores site configuration. |
Have the same issue, some fix please |
Looks like m-strojek fix works! Ty |
Closing as solution is available above. |
THX @m-strojek |
@piotrekkaminski Im confused as to why this issue is closed. While the solution that @m-strojek provided works, shouldn't this be added to the Magento code? Why should all of the store owners need to make this fix themselves? |
@piotrekkaminski Again, why is this closed? |
thanks @m-strojek. |
Why is the solution not added to the core code? Is there any other reason? |
This "fix" would break the standard store switcher that replies on cookies overriding server settings. The standard approach is for the server to set a default store, and then your cookie determines whether a different store is used. So adding this to the core code might solve your situation, but it would break other people's sites, so it's unlikely to be done. |
Fixed issues: - MAGETWO-71993: CMS Image Upload Response Contains Redundant Info - MC-5964: Fixed incorrect behaviour of sync actions - MC-10866: Cart's customer and address mismatch - MC-5947: Email templates breaking rendering
Steps to reproduce
1a. Disable Fullpage and block cache (just to avoid caching effects)
This setup is meant to handle country domains with a (not unique between stores) language prefix for urls.
E.g.
http://mysite.de/
http://mysite.de/en-DE/
http://mysite.at/
http://mysite.at/en-AT/
http://mysite.ch/
http://mysite.ch/en-CH/
a)
server {
server_name mysite.de
}
b)
server {
server_name mysite.at
}
c)
server {
server_name mysite.ch
}
Store 1:
Name: My Store (Renamed the default)
Root Category: use default
Default Store View: DE - DE
Website 1 (Default):
Name: My Website (Renamed the default)
Code: base
Default Store: My Store
Store Views 1:
Name: DE - DE (renamed default)
Code: base_de_de
Backend Base Url: http://mysite.de/
Backend Base Link Url: http://mysite.de/
Store Views 2:
Name: EN - DE
Code: base_en_de
Backend Base Url: http://mysite.de/
Backend Base Link Url: http://mysite.de/en-DE/
Store Views 3:
Name: DE - AT
Code: base_de_at
Backend Base Url: http://mysite.at/
Backend Base Link Url: http://mysite.at/
Store Views 4:
Name: EN - AT
Code: base_en_at
Backend Base Url: http://mysite.at/
Backend Base Link Url: http://mysite.de/en-AT/
Store Views 5:
Name: DE - CH
Code: base_de_ch
Backend Base Url: http://mysite.ch/
Backend Base Link Url: http://mysite.ch/
Store Views 6:
Name: EN - CH
Code: base_en_ch
Backend Base Url: http://mysite.ch/
Backend Base Link Url: http://mysite.de/en-CH/
Expected result
Actual result
Additional, at some time endless redirect loops occur between 2 of the stores after switching.
Can only be fixed by closing browser AND clearing session table AND clearing cache via commandline.
a) OK a correct store switcher preselection
b) OK a correct content (some configured cms page)
c) NOT OK Top Navigation links will show links with a
language/country prefix and url from the other store (e.g. mysite.ch/en-CH/somecategory.html even if you are on mysite.de.
Reload of the page will sometimes bring the correct results for the store, sometimes navigation from an other store (wrong too).
I even checked the context in the navigation block by echo of store id: it's correctly showing the expected store.
Hope that someone has an idea what went wrong here.
The text was updated successfully, but these errors were encountered: