Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By leisurman on
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
This is fixed
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.