Jump to:
| Project: | Domain Access |
| Version: | 7.x-3.7 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (works as designed) |
Issue Summary
I have set up three subdomains using Domain Access 3.7. All are currently inactive (for obvious reasons). The problems do not seem to be affecting the main domain. All three are set up on the server end as well as through Domain Access. Different things were happening on each (see below) and then...I thought to clear the cache and now all three subdomains redirect to mysite.com. Not certain if clearing the cache caused the change or if something else happened. Content created on the subdomains is accessible only through admin>affiliated content.
Previously:
Test.mysite.com Appeared to be working correctly. I was able to add content, create menus, etc. Was able to remove all mysite.com content without affecting mysite.com
sub1.mysite.com Redirected automatically to the main domain. No redirects visible either on the server end or in Domain Access. Deleting and recreating (both on the host end and through Domain Access) does nothing. It still redirects. Since this is what I want (while setting up the subdomains) that's fine for now but I can see no reason for the behavior. Eventually I'll need to be able to set up separate content.
sub2.mysite.com Working sporadically. Menu items added appear on mysite.com, menu items removed are removed from mysite.com. Content added through sub2.mysite.com is specific to the subdomain, but removing blocks (which worked in test.mysite.com) removes those blocks from mysite.com as well.
I have Forum Access active and Node Access loaded but not currently being used.
I am running Drupal 7.18
I am running MySql and PHP, but I don't know how to find the versions on those.
Currently active are Domain Access, Domain Blocks, Domain Content. Others were loaded but I started removing them one by one to see if that would fix the problem. I didn't remove the last three because I want to keep the changes made to the subdomains if possible.
Domain Access settings:
Content Defaults: Default to author's currently active domain
User defaults: Set to mysite.com because if I enter anything else it disappears after saving. It feels like this might be related, but I have no idea how.
Restrict node views for administrators
Default Source Domain: Do not change domain
www prefix handling: Process all host requests normallly
Let me know if you need other setting information.
If it's a server issue, any talking points for my call to them would be appreciated. Since I don't know what has contributed to the problems, my previous issue (and solution) is "Domain Access module throwing 403 error on new subdomain." index.php was in /public rather than /sites so I had to put the subdomain folders in /public to make Domain Access work. If this is contributing, I apologize in advance.
I removed a number of other modules that I wasn't using--no change. Clearing the cache in Drupal cleared up one thing--now only the sub*.mysite.com is redirecting. www.sub*.mysite.com appears to be at least going to the appropriate site, although the data for mysite.com is still showing. When I go to content I see the mysite.com pages. I checked my hosting provider and they have both (with and without www) in the DNS fields. I did not want to try moving the index.php file because I don't know what the result will be and I don't want to break my production site. I put an htaccess file under each subdomain--no change.
Hopefully this gives you enough information, and isn't too scattered.
Thank you for building this module, and for your help. I see your name all over the place on the forums, so I know you're spending a lot of time on this. Just thought I'd let you know that it's appreciated.
Comments
#1
You should use the provided Server Information block to see how the actual requests are being processed.
Also note that DA will issue a redirect on inactive domains if the user does not have the "View inactive domains' permission.
#2
The redirect behavior is in domain_invalid_domain_requested(), called by domain_init().
#3
Thanks! I didn't even know that existed. Activated now, but "view inactive domains" is not listed. Is that "access inactive domains?" That piece is set for administrators (information below). I see the "Domain Match" problem, but I'm not sure how to resolve it. I removed and re-created sub1 on both sides before (server and through Drupal) and there was no change.
If this follows the pattern, I'm probably missing something really simple.
When I switch domains through the domain switcher (I turned that on as well) sub1 is still redirecting but sub2 and test go to the correct site (and Domain Match changes to "true" ). When I try to switch using the address bar, same behavior as before. Even going in through the Domain Switcher when I make changes to Sub2 those changes are reflected on the main site, but I'll deal with that piece later. One thing at a time (unless they're all related)
Thank you for your help! Making progress!
HTTP_HOST request: www.sub2.mysite.com
Domain match: FALSE: Using default domain.
domain_id: 1
subdomain: www.sub2.mysite.com
Domain Name (Removed)
scheme: http
valid: 1
weight: -1
is_default: 1
machine_name: www_mysite_com
path: http://www.mysite.com/
site_grant: TRUE
administrator: Administer domain records and settings
administrator: Access inactive domains
administrator: Assign editors to domains
administrator: Set domain access status for all content
administrator: Publish content to any assigned domain
administrator: Publish content only from assigned domain
administrator: Publish content only from the default domain
administrator: Edit any content on assigned domains
administrator: Delete any content on assigned domains
administrator: View unpublished content on assigned domains
#4
Yes, "Access inactive domains" is correct.
The Domain match: FALSE piece means that the HTTP HOST request lookup failed. That suggests that using the www.* is causing an issue.
If you haven't registered the domain _with_ the www prefix, makes sure you enable the setting to "Treat www.*.example.com as an alias of *.example.com".
All your problems likely stem from this HTTP HOST negotiation failure.
#5
I thought I had both, but in either case that solved the redirect problem for sub2 and Test. Sub1 is still redirecting, still showing False under Domain Match. This one isn't as urgent--the content destined for this is already hosted on the main site so I can leave it inactive for a while. If you have any other ideas I'd appreciate hearing them.
#6