I've previously used this module with Drupal 7 with a language path prefix with no problem. But for this new site I'm trying to use language domains instead, and this time it doesn't work at all.
When I go to a page in English, like "http://en.example.com/user" and I try to go to the French version, where the French domain is "http://fr.example.com", it ought to go to "http://fr.example.com/user" but instead it tries to go to "http://fr.example.comhttp//fr.example.com/user", thus with protocol and domain name repeated (but with the colon missing).
The value for the item in the dropdown box is ""http://fr.example.comhttp://fr.example.com/user", thus the removal of the colon is an artefact done by either Drupal when redirecting, or by the browser. (I use Firefox, but the effect in MSIE9 is the same.) In the constructed URL it is an exact repeat.
Comments
Comment #1
andy inman commentedPossibly same as http://drupal.org/node/1192136
I'm looking at fixing another issue in the D6 version - http://drupal.org/node/1280744
I think the code needs a general tidy-up, but I don't really have time!
Comment #2
bartl commentedI think the problem is that when the domain changes, url() return an absolute domain. So you shouldn't try to construct the absolute domain by hand, but instead, never include the domain name yourself, and specify to url() that you want an absolute domain (I think that is the 'abs' option).
Actually if the domain doesn't change then the link doesn't have to be an absolute URL. So just dropping the domain in the construction of the URL should suffice.
Too bad that for my site we decided to roll back the dependency on language domains, so I can not really test it any more.
We made the domains just aliases, and I built a little module that decides on a default language per domain, inserted in the language selection chain at admin/config/regional/language/configure; so that a user can still override the language using a language prefix in the path; something the default Drupal system doesn't allow.
Comment #3
mohammed j. razemShould be fixed in new 7.x-1.0 release.