Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Strange behavior when switching websites/stores
 
Relja
Jr. Member
 
Avatar
Total Posts:  19
Joined:  2010-10-22
 

I have a two-store (for two languages) main website and 4 other websites installed on my system (3 of those are english only, 1 is english+german).

Strange thing happens when I try to access one of the additional websites from the main site - if the selected language on the main site is english the store change is succesful and I am shown the selected store. But if the selected language on the main site is german the home page of the main site is shown instead of other store. And this happens in both cases - clicking the other store’s link, or directly typing the other store’s URL in the address bar. And it happens the same for all other stores.

Basically, I can’t access any other website store if german language is currently activated.

Anyone has any idea where the solution might be?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Relja
Jr. Member
 
Avatar
Total Posts:  19
Joined:  2010-10-22
 

Noone? Anything? :(

 
Magento Community Magento Community
Magento Community
Magento Community
 
Matteus80
Member
 
Total Posts:  37
Joined:  2010-05-25
 

Are you using “Add Store Code to Urls” (System -> configuration -> general -> web)?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Relja
Jr. Member
 
Avatar
Total Posts:  19
Joined:  2010-10-22
 

No, that option is disabled.

I\’ve tried experimenting with those URL options, but nothing helps.

URLs for my stores are:

mymagento.com/shop/ - for the main website

and

mymagento.com/shop/retail/usa/ - for one of the other sites (others are similar).

So, if a german language is activated on the main website, and i enter the following url: mymagento.com/shop/retail/usa/ , the URL in the address bar stays exactly like that, but the page that displays is the home page of the main website. If english is activated then the switch to the other store is successful.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Matteus80
Member
 
Total Posts:  37
Joined:  2010-05-25
 

Well, did it work at some point and then stopped working after adding websites?

I think adding store codes to urls helps magento out alot. If you are coming from an outside page to yoursite.com/products.html magento will go to the default store if there are products.html url key in several of your stores. This could be a problem but your setup is more advanced than any I have worked with.

If I were you, and without any more background knowledge of your setup, I would probably backup my site, then add store codes to urls, then drop the url rewrites table in my db, then reindex url rewrites in admin backend.

Not saying you should do that, but that is what I would try… Or maybe wait for someone else to reply smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Relja
Jr. Member
 
Avatar
Total Posts:  19
Joined:  2010-10-22
 

Honestly, I don’t know whether it worked because I’ve entered the project while it was already in development, and I’ve noticed this problem only recently.

Anyway, I’ll certainly try that, have nothing to lose smile thanks for the tip.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Relja
Jr. Member
 
Avatar
Total Posts:  19
Joined:  2010-10-22
 

Well, It actually helped, thanks smile

The URLs are a bit uglier now so I’ll have to change them to a bit nicer look, but the important thing is that it works!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top