I found that if the "Domain access options" of a node are set to the default domain (ID=0) only and "Send to all affiliates" is unchecked, the node will also be visible on any affiliate site other than the default domain.
In access callback function "domain_adv_node_access" there is the line
if (!isset($node->domains[$GLOBALS['_domain']['domain_id']]) && !isset($node->domains[-1])) {
What is the second condition supposed to do? Actually it checks whether a node has grants for the default domain (ID=0), but I think it should check for "all affiliates". Hence I replaced the line above by
$domain_id = $GLOBALS['_domain']['domain_id'];
if ($domain_id == 0) $domain_id = -1;
if (!isset($node->domains[$domain_id]) && !$node->domain_site) {
Note: $node->domains and $node->domain_site are set in function "domain_nodeapi".
Comments
Comment #1
guusbosman commentedmindgame -- thanks for providing a patch for this. I ran into this exact same issue on my 2 sites; your patch does the trick.
After changing the code in /modules/domain_adv/domain_adv.module, I tested it and works fine. Rebuilding content access permissions (admin/content/node-settings) didn't seen to be necessary after the code change but I did it just to make sure.
Comment #2
t0b1 commentedthanks for this patch :-)
just played around with domain acccess and had the same problem. now i've applied your small patch and ... it works! great work!
thanks and greetz from hamburg
Comment #3
gordon commentedI have applied this patch to the dev version. Please let me know if it all works, and I will create a new RC
Comment #5
jbomb commented#907432: Content published to primary domain always appears on all affiliates. has been marked as a duplicate