Authors and keywords in missing in search index with node access enabled. Queries tagged with node_access

Created on 30 November 2018, about 6 years ago
Updated 9 November 2023, over 1 year ago

We have a site with Content Access enabled and biblio is currently restricted to authenticated users.

Full core Node search was working on everything bar authors and I tracked this down to the way the authors are loaded:

function biblio_load($nodes) {
... 
  $contributors = biblio_load_contributors_multiple($vids);
...
foreach ($result as $record) {
....
    $nodes[$record['nid']]->biblio_contributors = isset($contributors[$record['vid']]) ? $contributors[$record['vid']] : array();
    $nodes[$record['nid']]->biblio_keywords     = isset($keywords[$record['vid']]) ? $keywords[$record['vid']] : array();
...
)

And this does:

function biblio_load_contributors_multiple($vids = array(), $auth_category = 0) {
....
  $query->addTag('node_access');
...
}

Similar issue for biblio_load_keywords_multiple() that is also tagged with that.

🐛 Bug report
Status

Closed: outdated

Version

3.0

Component

Code

Created by

🇦🇺Australia alan d.

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024