I'm able to create a multisite web with language negotiation prefix but I'm totally unable to do the same with language negotiation domain. I'm trying to investigate why and no luck.
This is a test I have done that makes me think there is something wrong in this language negotiation method (or otherwise there is something needed to configure -not very friendly- that I don't know).
- Install fresh drupal 7.12 site, example.com
- Enable core modules locale and content translations
- Add another language in admin/config/regional/language, for example spanish, and configure its domain, es.example.com
- Configure language negotiation to domain in admin/config/regional/language/configure (by enabling url detection method and setting it to domain)
- Enable block language switcher
- Disable core module overlay
- Manually navigate to es.example.com. First problem you are logged out as the cookie won't recognize you at the subdomain.
- Login again in this spanish domain. Bug again the login just redirects to wrong path.
- Try to navigate to different admin pages by clicking on the menu toolbar links. All wrong links. Links are constantly growing and growing because are relative paths and are appended constantly to current path.
es.example.com/es.example.com/admin/content
es.example.com/es.example.com/admin/es.example.com/admin/appearance
es.example.com/es.example.com/admin/es.example.com/admin/es.example.com/admin/people
...
What I have seen is that for a link like this:
'es' =>
array (
'href' => 'node/1',
'title' => 'Español',
'language' =>
stdClass::__set_state(array(
'language' => 'es',
'name' => 'Spanish',
'native' => 'Español',
'direction' => '0',
'enabled' => '1',
'plurals' => '0',
'formula' => '',
'domain' => 'es.example.com',
'prefix' => '',
'weight' => '0',
'javascript' => '',
)),
'attributes' =>
array (
'class' =>
array (
0 => 'language-link',
),
),
),
the function url returns 'es.example.com/node/1' which is a relative path and if used in a link the uri where you would be redirected would depend on current uri. For example if you are now in es.example.com/node/55 and you click that link you finish in http://es.example.com/node/es.example.com/node/1, and if you are on es.example.com/content/mypage and click such a link you finish in http://es.example.com/content/es.example.com/node/1.
For the default language url would return "/node/1" that does not depend on current node where that link is present but depends on current domain. So if you are on domain example.com and you click a link like that you finish in http://example.com/node/1 but if you are in es.example.com and click that link you finish in http://es.example.com/node/1
This seems not correct at first glance but maybe there is something I need to configure to avoid all this current uri and current domain dependence from happening.
Is something wrong on core or I'm doing something wrong and if I'm doing something wrong, is there any place with documentation to understand domain name language negotiation?
Comments
Comment #0.0
manfer commentedBetter readability of message
Comment #1
qwckbrwnfx commentedHi there,
I am sharing one similar issue, and I have a suggestion you could try to resolve your issue with links.
For your issue with the URLs showing up incorrectly:
I had a similar issue. I needed to make sure that under Configuration > Regional and Language > Languages I had entered "http://" in front of my "Language domain" setting for each language I was using. For example, "http://fr.example.com" instead of only "fr.example.com". Could that be your problem?
I also needed to make sure I set up those subdomains on my hosting provider too, you did not mention that step.
My issue in common:
Although I do have subdomains working for my languages, users are logged in/out separatly at the two domains. You can see full details of my issue here:
http://drupal.org/node/1545778
If anyone has any suggestions to help me with the logged in/logged out issue, I would love some help. Thanks!
Comment #1.0
qwckbrwnfx commentedWrong word used in phrase.