I have upgraded to rc3 and confirmed that menu links work and that there are no back doors to accessing nodes. Good work on fixing that! I would say that I am about ready to start using Domain Access in a production installation.
I have a question with the Domain Access Options. It seems to me like there is an "all or none" approach to the node redirect policy, as set in Administer » Site building » Domains » Settings » Advanced Settings, where SEO gets set to Rewrite all URLs. I would like to be able to choose this behaviour on a node-by-node basis.
Here is an example to illustrate:
There are three affiliated websites (using domain access):
- Corporate: site1.mydomain.com [http, primary domain]
- Service: site2.mydomain.com [http]
- Online Orders: secure.mydomain.com [https]
The following node types/menu items:
- a "Sales" page (node) containing information only relevant to Corporate (site1)
- a "Support" page containing information only relevant to Service (site2)
- an Webform "Order" page that is accessible from all three sites but redirects to the https site for privacy.
- a "Legal Notices" page that available from any of the 3 sites but does not redirect at all.
- An "About Us" page that, like Legal Notices, is accessible from all three sites and does not redirect.
Specifically, how should I accomplish 4 (and 5)?
It seems to me that, while the SEO URL rewrite feature is useful, rather than forcing that behaviour, it would be more flexible to treat that setting as a site-wide "Default" behaviour and then allow it to be deselected in the Domain Access Options of the node being created/edited.
--
stephen@hardfocus
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | Picture 1.png | 78.91 KB | agentrickard |
| #3 | domain_default_source.patch | 2.61 KB | agentrickard |
| #2 | domain_default_source.patch | 1.95 KB | agentrickard |
Comments
Comment #1
agentrickardWell, you have two default options here.
Using SEO rewriting by itself, the following rules are enforced:
- If SEO settings are turned on, all node links are rewritten as absolute URLs.
- If assigned to 'all affiliates' the node link goes to the root domain.
- If assigned to a single affiliate, the node link goes to that affiliate.
- If assigned to multiple affiliates, the node link goes to the first matching domain.
(Determined by the order in which domains were created, with your primary
domain matched first.)
You can also use the provided Domain Source module to select which domain a node should be directed to.
Doing this per node (or per node type) would require extra code overhead -- it is possible, however, to alter the custom_url_rewrite_outbound() function to meet your needs.
Since that function is included by settings.php, it would be easy for you to copy the function and edit it as you see fit.
The quick way to do this is to include a switch case early in the function -- this would be the most efficient, but more work for you:
You could also comment out the final clause in the function, which is the part that affects nodes viewable on all domains:
We could add a behavior toggle for how to handle nodes viewable on all domains, which would add yet another configuration option. Probably the best way would be to let you select which domain to use to 'all affiliates' under SEO.
Comment #2
agentrickardHere's a patch, ready for testing.
It creates another Advanced configuration option:
This is a select list. Default is root domain.
Comment #3
agentrickardRevised patch that lets you specify "do not change domain.'
This is still a global setting. It affects all node assigned to 'all affiliates'.
Comment #4
Critical Tinkerer commentedSorry for the long absence... got sidetracked with other more pressing work.
Revised patch that lets you specify "do not change domain.'
This is still a global setting. It affects all node assigned to 'all affiliates'.
I have applied domain_default_source_0.patch but I cannot find the "do not change domain" setting.
I did find "Default source domain" setting, however, so it appears that the patch did take.
--
Stephen
Comment #5
agentrickard'Do not change domain' should be the first option in the select list.
Comment #6
Critical Tinkerer commented'Do not change domain' should be the first option in the select list.
Sorry.... what list? I am looking at...
Home » Administer » Site building » Domains » Settings
... I still can't find "Do not change domain". I even expanded all the sections and keyword searched.
stephen@hardfocus
Comment #7
agentrickardUnder 'default source domain' there should be a select list.
Comment #8
Critical Tinkerer commentedUnder 'default source domain' there should be a select list.
Sorry, there isn't.
--
stephen
Comment #9
agentrickardYou must apply the patch in #3 correctly and have domains configured.
See attached proof.
Comment #10
Critical Tinkerer commentedYou must apply the patch in #3 correctly and have domains configured.
As I said in #4, domain_default_source_0.patch was successfully applied.
Domain configuration hasn't changed since my previous tests in this thread. (one main site and 2 sub-sites). So could it be some other conditional in the patched code isn't being met?
--
stephen@hardfocus
Comment #11
agentrickardThere are no conditionals in the patched code.
After applying the patch, lines 277-290 of domain.admin.inc should be:
Comment #12
Critical Tinkerer commentedThere are no conditionals in the patched code.
After applying the patch, lines 277-290 of domain.admin.inc should be:
Confirmed that. Also confirmed that "Do not change domain" exists, after all. I don't know why I missed it before, except maybe a combination of not enough sleep and it being hidden in the drop down behind my domains.
Sorry for the wild goose chase! Back to testing....
--
stephen@hardfocus
Comment #13
agentrickardThis has been committed to HEAD for testing.
Comment #14
agentrickardNeeds documentation and a port to D5.
Comment #15
agentrickardCommitted to HEAD and 5.x.
Comment #16
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.