Hi there,
What is your idea for related content with Domain module in 6th Drupal?
Relevant Content and Similar By Terms modules don't respect domain
restrictions, displaying all domains' nodes, what is a bit confusing for me.
I can make a view with Views and Domain Views, but I can't sort it
by related tags' number, like RC and SBT do...
Any your experience with that? Hints?
Szy.
Comments
Comment #1
agentrickardIf those other two modules do not respect the domain, that is likely a bug in their (mis)use of db_rewrite_sql().
All node listing queries are supposed to be wrapped in db_rewrite_sql() in order to enforce node access rules.
Comment #2
szy commentedThanks, I've submitted issues for those modules.
But the question remains open: how people get related/relevant/similar content
with Domain Access in 6th Drupal?
Szy.
Comment #3
szy commentedSimilar by Terms' author says his module works fine. You said that
your Domain module works fine too...
But somewhere there must be something wrong, what makes
Similar by Terms block to display nodes from all system domains,
instead of the active one.
Could you please look into it, Agent? :]
Tia,
Szy.
My DA Settings:
New content settings: *
( ) Show on all affiliate sites
(o) Only show on selected sites
Content editing forms: *
(o) Pass the default form values as hidden fields
( ) Take user to the default domain
...
Debugging status: *
(o) Do not show debugging output
( ) Show debugging output on node view
Sort domain lists: *
(o) Creation order, oldest > newest
( ) Creation order, newest > oldest
...
Search settings:
(o) Search content for the current domain only
( ) Search all domains from any URL
Search engine optimization:
( ) Do not rewrite URLs
(o) Rewrite all URLs to point to a single source
WWW prefix handling:
(o) Process all host requests normally
( ) Treat www.*.example.com as an alias of *.example.com
I don't use Domain Source.
Comment #4
agentrickardNode access rules do not apply to user 1 or users who can 'administer nodes.' Be sure to test as another user.
Comment #5
agentrickardAlso check the advanced node type settings to be sure that you have disabled the 'send to all affiliates' for all content types.
Comment #6
szy commentedBoth user 1 and anonymous can see content from all domains. 'Send to all...'
is disabled..., all node types are disabled at Node settings / Domain node types.
... still Relevant Content and Similar by Terms show not correct nodes :/
There is the first row in node_access table:
... are these values correct?
Am I the only user displaying related content in Domain Access? :/
Szy.
Comment #7
agentrickardThose values are correct. See section 4.4 of README.txt.
What other values are in the {node_access} table?
Comment #8
szy commented... etc, over 25,000 records, one per every node I have. There were records
'domain_source' too, but they disappear after uinstallation of Domain Source.
I've found Similar Entries and barely working Related Links modules - they display
content from all domains too... :/ And there is no more way to display related
content in D6.
I even have wrapped SELECT queries with db_rewrite_sql where needed, but
nothing has changed (there is db_rewrite_sql in Similar by Terms, afair).
Szy.
Comment #9
nonsieWhy not attempt to achieve this with Views?
Comment #10
szy commented@nonsie - with pleasure - how? :]
This is the most wanted thing for me now: having a views code (not block)
working as these 'related' modules do. Then I could filter them with Domain
Views.
Related modules work this way: looking for nodes with specified terms, then
sorting them by terms number, then by posting date.
This code would be all related modules killer... ;)
Szy.
Comment #11
szy commented@agent - could it have anything in common with my issue?
-> http://drupal.org/node/216148 ...?
Szy.
Comment #12
agentrickardSimilar Entries module does not appear to use db_rewrite_sql() at all.
Ref: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/similar/sim...
The following queries ignore node access (line 400 and 403):
Even if wrapped in db_rewrite_sql(), these queries will not work, since the default primary key is 'nid' on table 'n' not table 'r'.
These queries are bugs in Similar Module.
Ref: http://api.drupal.org/api/function/db_rewrite_sql
See http://api.drupal.org/api/function/node_db_rewrite_sql, which is where node access rules are enforced.
Similar Terms (if available for D6) should work correctly. Your DA tables are normal.
Comment #13
agentrickard