Hi All,
I'm hoping to get some help figuring out the below issue:
------ Set up -----------------
Drupal Core 6.22
Other Access Control Modules
ACL
Content Access
Domain Access 6.x 2.13 with the following enabled
- Domain Configuration
- Domain Content
- Domain Navigation
- Domain Theme
- Domain Views
Primary Domain uses i18n and has 4 languages
I have set up the following domains and content:
www.primarydomain.com (custom theme)
www.secondomain.com (tried Garland and Acquia Slate - same problem for both)
I created 1 node (while in PrimaryDomain) and under Publishing Options the only checkbox that is selected is www.secondomain.com. This node has been added to a separate menu (Secondomain Primary Links). Secondomain Primary Links Menu has been selected as the source of Primary Links for Secondomain and is also selected as Default Menu for Content for Secondomain.
I have enabled the Domain Primary Links block to appear in the header region for both Garland and Acquia Slate.
The Settings.inc include is working in sites>default>settings.php. There are no DA error messages. I've also added these two lines:
require_once './sites/all/modules/domain/domain_conf/settings_domain_conf.inc';
require_once './sites/all/modules/domain/domain_prefix/settings_domain_prefix.inc';
$base_url in Settings.inc has been commented out.
The Domain Server Info block has been enabled. For www.secondomain.com, the following is indicated:
Property Value
HTTP_HOST request www.secondomain.com
Domain match TRUE
is_default 0
domain_id 3
sitename Second Domain
subdomain www.secondomain.com
scheme http
valid TRUE
path http://www.secondomain.com/
site_grant TRUE
For theme, content, and almost everything Domain Access works great for www.secondomain.com. But I have the following problem:
------ The problem -----------------
When viewing www.secondomain.com, The Primary Links Menu appears, it displays the Menu Item for the 1 node that should be there. BUT, the url for that one menu item is www.primarydomain.com/node/977 and clicking it takes me to the Primary site. I was expecting the URL to be www.secondomain.com/node/977.
Additional indicators:
Site Name and drupal logo on www.secondomain.com link to www.primarydomain.com
When logged into www.secondomain.com, all other system links link to www.primarydomain.com.
My Guess: Somewhere the Base URL is not resolving correctly but for the life of me I can't figure out where or how to fix.
Any help much appreciated.
Thanks.
-Chris
Comments
Comment #1
Hubris-1 commentedI believe I've isolated the issue I'm having. My current set up (with i18n) is as follows:
www.primarydomain.com (english, languages by domain/URL only so base URL is set here)
---www.primarydomain.cn.com (chinese)
---www.primarydomain.ru.com (russian)
www.secondomain.com (only need this to be in English, but the use of i18n for the primary domain seems to be causing my issue where primary links point to the primary domain)
The domain/url defined for the primary domain in Language settings is defining the base URL. This is carrying over to affiliated content so that links to that content are having the base url overriden.
I've found Domain Locale and Domain Internationalization Modules, but still can't figure out where to set the base URL for English for www.secondomain.com with either of these modules. For domain_i18n variables, is there a variable for base_url that I can define? For Local module, when I look at the list of languages there is no Edit link for each language where I can define the base url.
..still plugging away at this issue.
Comment #2
agentrickardThis is a very nice report, btw.
Are there any modules or configurations (as in settings.php) that are setting $base_url to a string?
With DA, you need to let $base_url be set automatically, so if it is being set to a string (by i18n, for instance), then that would explain the issue.
Comment #3
hubris commentedAt the moment I think my issue is similar/duplicate to this issue mentioned in regards to Domain Locale module.: http://drupal.org/node/1008888 (with no resolution other than switching to using language prefixes instead of Domain Only).
Problem Summary:
The $base_url is being set by i18n when Language Negotiation setting is set to "Domain Only", and each language domain has a field for setting the language domain. The result is that any link generated by the system that uses $base_url points to the Primary Domain rather than any secondary domains.
Ideally the i18n page at: admin/settings/language/edit/ would be domain-sensitive so that the language domain for each sub-domain could be set (mentally it's a little convoluted).
At this point I'm sunk.... There might be a solution in table pre-fixing, or a pre-process function for menus, but I'm not that dangerous. Thanks for taking a look.
Comment #4
agentrickardIf you know when i18n is setting that, you might be able to override it. What function sets that value?
Comment #5
Hubris-1 commentedFound a little more information here: http://drupal.org/node/450344
It refers to a method & patch for calling both DA's and i18n/Facebook's domain rewrites. I'll have to explore this further.
For the moment though I can get away with entering full URL's in the Primary Links menu (instead of 'node/977' I enter 'http://www.secondomain/node/977') That'll fix the menu issue, and I'll have to be real careful about any system generated urls... such as a Views. It's a crippled solution, but it'll get me past the current hump.
Thanks,
-Chris