If you build a view and the private_taxonomy_query_term_access_alter query is executed for some reason, the module can sometimes disable content for non-privileged users even if the view does not use a private taxonomy vocab.
The code is this
// Views exposed filter uses 'machine_name' instead of 'vid'.
if ($field == 'machine_name') {
$info = taxonomy_vocabulary_get_names();
if (is_array($condition['value'])) {
$flag = FALSE;
foreach ($condition['value'] as $machine_name) {
$vid = $info[$machine_name]->vid;
if (!private_taxonomy_is_vocabulary_private($vid)) {
$flag = TRUE;
break;
}
}
if (!$flag) {
return;
}
}
As you can see: even if private_taxonomy_is_vocabulary_private returns FALSE, the flow is not stopped and the content may get hidden.
Comments
Comment #1
trobey commentedIt indeed looks like I cut and pasted code and missed something. I have updated the code and committed it to 7.x-1.x-dev. I do not have a good test case so anyone that can test this would help.
Comment #2
killes@www.drop.org commentedThanks, that works!
Comment #3
Andre-B