Closed (outdated)
Project:
Domain
Version:
7.x-3.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Mar 2012 at 16:03 UTC
Updated:
2 May 2025 at 12:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
agentrickardActually going to call this a bug.
Comment #2
kelutrab11 commentedInteresting. Didn't even try to use Domain Navigation but It could be worth a try. I tried use code from domain_alias but without any success in this particular case.
Comment #3
spamator12 commentedI can confirm that with i18n this bug is active and frustrating cause you can't use
Link to active url
without sharing content along all the sites.
Comment #4
kerios83 commentedIs this hard to fix ? Will there be given any ETA ? I'm asking cause it's the last think that delay my site going to live :)
Comment #5
henrix34 commentedFollow
Comment #6
agentrickardIt's hard to fix if you don't use i18n.
I find it very hard to believe that no one who uses DA and i18n is capable of writing a patch.
@henrix34 -- Please use follow links from now on. See the button in the upper right of the page.
Comment #7
batigol commented@kerios83 thanks for notice it :) I didn't notice that user Navigation don't work as my admin domain switching, nice catch.
Comment #8
agentrickardThis patch seems to work, but touches a lot of the underlying interfaces, so we need:
* User reports of successful tests.
* Automated tests for the functionality.
Comment #9
agentrickardAlways a good idea to remove debugging statements.
Comment #10
batigol commentedThis patch is working great! Thx!
EDIT:
BUT I have noticed that all links pointing to other domains use (besides domain navigation) language prefix x2. For example yoursite.com/pl/pl/aktualności (from main domain to a subdomain). Links pointing to default English language (without prefix) are fine though.
Comment #11
agentrickardI don't get that behavior. Are you using Domain Path or any other module that rewrites URLs?
What is generating those links? Domain Nav? The Domain Switcher block? Drupal core?
Comment #12
batigol commentedViews. I'm using views to display my news and when you click on the title you are redirected to proper domain/subdomain the news belong to. Domain Navigation, Domain Switcher block are working fine.
Comment #13
agentrickardIs it the TITLE or the READ MORE link that is broken? Or both?
Comment #14
batigol commentedBoth.
Comment #15
agentrickardThanks.
Comment #16
kerios83 commentedAdding path and use it in rewrite results (as a link rewrite with absolute url) doesn't fix this. Views still use /lang-prefix/lang-prefix/ in link.
Comment #17
kerios83 commentedComment #18
agentrickardI cannot replicate this error using:
* DA 7.x.3
* Views 7.x.3
* Content Translation (core)
* Locale (core)
* Bartik (core theme)
* Path-based language negotiation.
* Three test languages (English, Swedish, Finnish)
* Content with no language assigned.
* Content in English with a translation in Finnish.
In all cases, the View works as expected. Note that I modified the View to remove certain fields and conditions not on my site.
So what is different about your configuration?
Comment #19
agentrickardTo be more clear: the provided View works correctly for me when the patch is installed.
Comment #20
kerios83 commentedI have apply the patch and used provided view with same results (prefix x2). Did those news (content) were assigned to different domain/subdomain - other then your default one ? Cause I don't have this problem when content is assigned to default domain.
EDIT: You do check the URL Detection method ? [Home » Administration » Configuration » Regional and language » Languages - Determine the language from the URL (Path prefix or domain).]
Comment #21
agentrickardGot it.
Comment #22
agentrickardDA only supports path-prefixing. I duplicated the problem by assigning something to a domain other than default,
Comment #23
kerios83 commentedOk, I can only add that on clean drupal 7 install I still have this problem:
drupal 7.12
Chaos tools 7.x-1.0
Views 7.x-3.3
Domain Access 7.x-3.3
* Content Translation (core)
* Locale (core)
+ URL Detection method
i18n, token, pathauto, variable, language icons, doesn't seems to been related with this issue (tested with few configuration possibilities and clear cache, update.php).
Comment #24
agentrickardI found the problem with the patch. This bit of the code forces the url() function to run twice, once on the root url for the domain and once for the requested path.
The only solution I found was to make $language an optional argument for domain_get_path() and domain_get_uri(). Only domain_nav_render() passes a $language parameter.
I am not crazy about this solution, but it seems to work as expected.
We could use a test case for this behavior as well.
Comment #25
batigol commentedGreat job, this is working exactly as it should. I can't say anything about code cause I'm not a programmer but module behaves in harmony with user expectations.
Comment #26
kerios83 commentedThis is working! Thanks!
Comment #27
agentrickardOk, so once we have a working test, this can go in.
Comment #28
henrix34 commentedPatch from http://drupal.org/node/1508448#comment-5858222 is working. Thanks.
Comment #29
Farreres commentedCan you post a drupal 6 equivalent patch?
Comment #30
agentrickardUpdated patch against HEAD.
The tests still need work. There are some configuration options for language negotiation that are difficult to set properly.
Comment #31
agentrickardI still can't make the tests work.
Anyone who wants this feature really needs to help out or else it's never going in.
Comment #32
batigol commentedHi agent, I run some tests on 7.15 with older version of DA (7.x-3.3) and patch from #24 is working fine for me.
I'm gona test newest patch later on.
EDIT: The patch applies partially (I have test it even with 3.4 - same thing happen).
domain.nav.module is updated, domain.test is updated, domain.module is NOT updated.
EDIT2:With this patch domain.module is updated - (can't attach a patch - drupal.org error - gona do it l8er)
and it seems that everything is working fine.
Comment #33
batigol commentedThere is problem with opera if you want attach something, working fine on firefox however, here is a patch.
Comment #34
agentrickardPatches need to go against the DEV branch of Git. See https://drupal.org/project/domain/git-instructions
Comment #35
henrix34 commentedI can't download 3.3 dev version so if I understand correctly I must test this patch with 3.4 dev ?
Comment #36
agentrickardIn git, you want branch 7.x-3.x. If you don't know Git, there are tutorials linked from that page.
Comment #37
henrix34 commentedThis is working extremely well.
Comment #38
kerios83 commentedI did test this last night. All good, green light here.
Comment #39
batigol commentedI have just install 3.6 and after checking available updates there is 3.7 already :P I remember that everything goes fine when I have tested this patch - #32. Anyway it's functionality is crucial so lets hope we will see it in 3.8
Comment #40
agentrickardAs I recall, the patch does not apply cleanly to 7.x-3.x branch, so it needs a re-roll. That's why it is marked "needs work".
Comment #41
spamator12 commentedTested with 3.3 no problems so far.
Comment #42
agentrickardThe patch needs to apply to -dev.
Comment #43
kerios83 commentedI had installed latest DA and I still get this error (with multilingual site). I can see this issue is not closed but the patch provided by @agentrickard is working so what happened... How to fix this ?
Comment #44
eMuse_be commentedAdded a patch for the 3.11 release, as this does not containt the update.
Comment #45
eMuse_be commentedComment #46
eMuse_be commentedThis is still not implemented in 3.11, is this going to be updated ?
Comment #47
agentrickardPlease set new patches to "Needs Review".
Comment #48
pwiniacki commentedI just 'discovered' this bug. After downgrade to 3.3 and install the patch it seems to work just fine!
Comment #49
pwiniacki commentedhttps://www.drupal.org/node/1508448#comment-9545413 is working fine (EDIT: with 3.11 of course). Thanks @eMuse_be.
Comment #50
agentrickardPatch was malformed and does not apply cleanly. We use -p1 formatted patches in Drupal.
Comment #51
agentrickardThe use of
. url('<front>');here is a code smell. That doesn't seem proper for language negotiation.The check for $language in domain_get_uri() makes no sense. That variable is never instantiated, nor is it passed to url() via $options, so that code needs a rewrite.
Comment #52
bluegeek9 commentedDrupal 7 in End of Life and no longer supported. We encourage you to upgrade to a supported version of Drupal. For more information, see https://www.drupal.org/upgrade.
Comment #53
xmacinfo@bluegeek9 Please note that Drupal.org (not the new parts) is still running on Drupal 7.
Make sure to prioritize Drupal.org Drupal 7 upgrade to new Drupal.