Closed (outdated)
Project:
Domain
Version:
7.x-3.x-dev
Component:
- Domain Content
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 May 2010 at 17:21 UTC
Updated:
3 Sep 2024 at 23:41 UTC
Jump to comment: Most recent
Comments
Comment #1
agentrickardWhat's not working about it? Where is the access being denied? Is the user being redirected away from the inactive domains?
Also make sure the nodes are published and the domains are not in maintenance mode.
Comment #2
agentrickardNote that rejected inactive domain requests are logged. So check the watchdog. If nothing's there, it's either a server or an alias issue. Or the user doesn't have the proper role.
Comment #3
dpb commentedThank you for your help. I can see I mixed up the "Valid domains" action with "Site Status". The "access inactive domains" permission still seems like the solution to my problem, though.
Nodes are / always were published.
I _was_ trying to run domains "active" and "offline". When I was working as the administrator, it was not a problem. I thought I could re-create that for an authenticated user. Currently, my customer's role has only "access content" and "administer site configuration" permission. This allows the user to land at the offline site and enter using the domain.com/user URL. It's probably not the best, but I like the "knock and authenticate" flow.
My problem with running domains "inactive" and "online" is that the user is getting redirected to the primary domain (which I would prefer to keep anonymous, BTW), which is confusing.
From the log:
Type: domain
User: Anonymous
Location: http://inactive.com/
Message: Invalid domain requested by on "inactive_sitename"; redirected to "primary_domain_sitename"
(I notice the empty space between "by" and "on"; maybe a user name is missing?)
Is there a way around the redirect?
Comment #4
agentrickardGive the role 'access inactive domains' and the redirect should stop. The empty space is because the anon user has no name.
Comment #5
agentrickardYou probably don't want to give Anon users this ability, however. But I think I see the problem. If you don't share a common top-level (*.example.com), then your users will never be able to login to their domain.
Are you using distinct domains for each user? e.g. myexample.com instead of my.example.com? With the latter, they can log in to the master site and then go to their preview domain.
There are some ways around this, actually, using a custom module an hook_domainload() to conditionally change the valid flag IFF the user is on the login screen.
This might work:
That would allow anon users to access the user page on any domain, which means they could login in. Then they might get redirected if they don't have the 'access inactive domains' permission.
Comment #6
dpb commentedAll of these sites are independent of each other. The primary domain is independent of all sites, as well. I probably could have worked harder at using the primary domain as a login gateway for reviewers, but I didn't want to confuse people with the extra (primary) domain and the concept of switching domains.
Your code solution seems right on. Unfortunately, I don't have time to test or implement it. My workaround is slightly risky, but it does allow/require my customer to log in and it places the responsibility for mistakes with my customer. There will be an audit trail, as well. All in all, I think I can live with the risk for the relatively short time it will take to review and release these sites.
I hope this helps others. Maybe this could be an enhancement for the future?
Thank you for your help.
Comment #7
agentrickardIt's a very edge use-case. Not sure the best way to support it.
Comment #8
agentrickardComment #9
dqdI'll close this issue due to inactivity for 14 years and there is upcoming EOL of Drupal 7 in January 2025. While the project's version for Drupal 7 will surely keep providing support for security issues and website breaking bug fixes for Drupal 7, we should try to minimize the open issues for Drupal 7 in the queue as much as possible. A big thanks around for the report and all the efforts in here. Feel free to re-open if you can provide a fix or found an additional related problem which increases the issue priority.