When Search Ranking is enabled with either TAC (http://drupal.org/project/taxonomy_access) or Workflow (http://drupal.org/project/workflow), all searches come up empty for the anonymous user (anyone without Administer Nodes permission).
To repro:
1) install the above 3 modules and enable Search ranking together with either (Workflow & Workflow access 6.x-1.1) or (Taxonomy Access Control 6.x-1.x-dev).
2) Rebuild the content permissions (www.domain.com/admin/content/node-settings)
3) Then as anon user or user without amin nodes permission try a search (www.domain.com/search/node/Lehrplan
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | search-ranking-3129050.patch | 1.07 KB | jcfiala |
Comments
Comment #1
johnmunro commentedNote that the anonymous user is able to browse the site content but it appears that search ranking cannot.
Either disabling the Search Ranking module or giving the Anon user 'Administer Nodes' permission restores search functionality. Neither of which is desirable, particularly the latter :-))
Comment #2
jcfiala commentedHm. I'm having a similar problem, only I think it's with the content_access module. I'm getting a sql error when trying to search anonymously:
user warning: Unknown column 'na.grant_view' in 'where clause' query: SELECT SUM(i.score * t.count) AS score FROM search_index i INNER JOIN search_total t ON i.word = t.word INNER JOIN node n ON n.nid = i.sid INNER JOIN users u ON n.uid = u.uid WHERE n.status = 1 AND (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'content_access_author') OR (na.gid = 1 AND na.realm = 'content_access_rid'))) AND (i.word = 'johanna') AND i.type = 'node' GROUP BY i.type, i.sid HAVING COUNT(*) >= 1 ORDER BY score DESC LIMIT 0, 1 in /var/www/harvard/harvard_cvs/modules/search/search.module on line 946.
Ah! Patch coming, but I've got to wonder if this has been abandoned.
Comment #3
jcfiala commentedAnd... patch!
Comment #4
johnmunro commentedNot abandoned. I'll see if I can test your patch next week. Thanks for the input John.
Comment #5
jleinenbach commentedsubscribe
Comment #6
OxideInteractive commentedsubscribe
Comment #7
mstrelan commentedThis is also an issue with Domain Access module, however the patch didn't fix the problem. It seems there is a further issue with spacing somewhere, but I disabled the module and don't have time to go back and check it out.
Comment #8
jlea9378 commentedInstalling this patch resolved the problem I was getting where searches by Anonymous users yielded no results.
Comment #9
johnmunro commentedSorry John Fiala, I was not able to test your patch until now, however...
The patch doesn't work for us. Our SQL error is:
It is the same basic error but seemingly with 'workflow_access' module rather than 'content_access'
Not quite sure how to officially apply patches, but I made the following change to line 181 of 'modules/search_ranking/search_ranking.module'
Comment #10
nuthman commentedI'm having the same problem and the patch isn't fixing it for me. After applying the patch, a new error appears:
user warning: Unknown column 'n.nidLEFT' in 'on clause' query: SELECT SUM(i.score * t.count) AS score FROM search_index i INNER JOIN search_total t ON i.word = t.word INNER JOIN node n ON n.nid = i.sid INNER JOIN node_access na ON na.nid = n.nidLEFT JOIN node_comment_statistics c ON c.nid = i.sid INNER JOIN users u ON n.uid = u.uid WHERE n.status = 1 AND (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'content_access_author') OR........