Hello,
I've been trying to use Domain Access + Domain Locale to have the following :
www.mysite.com => my main site, with normal name (and footer etc.), french : should use french drupal UI, french content, french strings, and when available, links to the english translations which redirect to the correct nodes in...
en.mysite.com => my localized site, with localized name (and footer etc.), english : should use english drupal UI, only display english content, have strings translated to english when available, nodes with a french version should have a link to their www version (redirecting to the www domain).
One user should be able to come have the english website each time he comes to en.mysite.com and french website each time he comes to www.mysite.com
I get it to work exactly as expected when logged in as admin, almost working when logged in as normal user (only have a small problem which probably doesn't have anything to do with Domain Locale), but it utterly fails when visiting as anonymous.
Anonymous users just have it completely wrong : switching domain brings completely unexpected behaviours, blocks don't even all have the same locale (and some simply disappear), they sometimes get english content on en.mysite.com, sometimes french content... Most of the time when they switch domain, they keep getting the same content as what they had in the former domain (for example, if they come from en.mysite.com and have been served english content, if they decide to visit www.mysite.com they still get english content)...
Most of the times, when clicking on a translation link, they are served the correct translation on the correct domain, with menus and blocks being in the correct language, but once in that domain, when they click on a link, unexpected behaviours start again.
For example, if an user getting english content clicks on the "French version" link, he goes to www.mysite.com/content/french-node-here and gets a french site... but when clicking on the Home button in the menu, while still being on the www (french) domain, he gets served english content again...
I just don't know what's going on, I'm not even sure this is really a Domain Locale problem, but, well, I'm trying, because I tried about everything I could think of to no avail (including disactivating boost, drupal core cache, and so forth...).
So if you have an idea of what I may be doing wrong, I'd be more than happy to hear about it... I can also give the real website URL if needed.
Thanks in advance.
Comments
Comment #1
Azrael256 commentedOkay, after much work, I finally understood many of my problems :
=> Everything that disappeared to anonymous users in the english version reappears once I check the "Send to all affiliates" checkbox for this content. I don't really get the whole affiliate thing, but now, I know checking only "Mysite International" in the affiliates list is a no-no, since it won't even display in Mysite International in that case.
=> Some blocks that wouldn't get the good language were my own fault (custom strings...)
=> I still have a problem when switching domain though... and it looks like a cache problem.
When i go from www (french) to en (english), I'm served the english content, everything's great.
When I go from en to www though, I keep getting the english content. That sucks! However, if I make a refresh with forcing the emptying of cache (ctrl+reload under IE for example), I finally get the french content.
As a consequence, I'm not sure anymore this is a Domain Locale problem. I keep the ticket open though, because it may be a module or something in my core configuration conflicting with Domain Locale, and because I'd like to understand why I need to check "Send to all affiliates" for my content to display on only one subdomain.
Comment #2
Azrael256 commentedOkay, I finally got it to work with Boost disabled, Boost-related stuff deleted from .htaccess, and disabling caching from my en subdomain.
Everything works great if I enable caching for my www subdomain BUT I have to disable en subdomain caching, otherwise, people switching from en to www get the en content. Which means people coming from the english wing to the french wing get served the english content (not the other way around though).
I still don't know if it's purely related to Drupal core caching, or if Domain Locale has something to do with it.
Comment #3
mac_weber commentedCleaning up the queue.
Reopen if needed.