When I activate content acess, all users except the admin can no longer use the search module. It returns this error
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 LEFT JOIN search_node_links_totals search_node_links_totals ON search_node_links_totals.sid = i.sid LEFT 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 (na.gid = 1 AND na.realm = 'content_access_rid'))) AND (i.word = 'date') AND i.type = 'node' GROUP BY i.type, i.sid HAVING COUNT(*) >= 1 ORDER BY score DESC LIMIT 0, 1 in /home/misange/domains/excelabo.net/public_html/drupal/modules/search/search.module on line 943.
I found some infos here
http://drupal.org/node/331651
but I am not familiar enough with drupal (6) to know where to modify the SQL query.
A help would be apreciated.
Comments
Comment #1
Misange commentedNo one ever had this problem ?
Comment #2
fagoThat sql is not generated by content access, but by drupal itself. More exactly it's written by the search module and modified by the node module. Search for related core issues.
Comment #3
Manonline commentedHi, i have a similar problem:
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 LEFT 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 = 3 AND na.realm = 'content_access_author') OR (na.gid = 2 AND na.realm = 'content_access_rid'))) AND (i.word = 'goal') AND i.type = 'node' GROUP BY i.type, i.sid HAVING COUNT(*) >= 1 ORDER BY score DESC LIMIT 0, 1 in C:\xampp\htdocs\drupal\modules\search\search.module on line 943.
Did you find the way to fix it?
Thanks :)
Comment #4
corydorning commentedhaving same issue...
Comment #5
STINGER_LP commentedme too, what about it?