I created a Related Topics sidebar that displays related taxonomy nodes using Views and an argument. And just recently it has been displaying duplicate nodes, the same node 4 times. I don't know when this started? The View is set it to 'Reduce Duplicates'
My view uses: Arguments/Node: Nid/Taxonomy: Term ID
The php code is

$node = node_load(arg(1));
$tids = array();
$vid = 2; // this is the vocabulary id to search through...
$terms = taxonomy_node_get_terms_by_vocabulary($node, $vid); 
foreach($terms as $term){
$tids[] = $term->tid;
}
return implode('+',$tids);

Any help please?

Comments

leisurman’s picture

I disabled the Content Access module when I had an access denied issue 1 month ago. I enabled that module back on and there are no more duplicates.