Closed (fixed)
Project:
Search Ranking
Version:
6.x-1.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Oct 2008 at 04:49 UTC
Updated:
23 Jul 2009 at 06:48 UTC
I'm receiving this error when performing a search.
When I disable the Search Rank plugin, the search feature works fine. I've uninstalled any module which might interfere, cleared caches, uninstalled and reinstalled the Search Rank module to no avail.
Any help or advice will be greatly appreciated.
user warning: Unknown column 'na.grant_view' in 'where clause' query: SELECT SUM(i.score * t.count) AS score FROM tu_search_index i INNER JOIN tu_search_total t ON i.word = t.word INNER JOIN tu_node n ON n.nid = i.sid INNER JOIN tu_users u ON n.uid = u.uid WHERE n.status = 1 AND (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all'))) AND (i.word = 'blah') AND i.type = 'node' GROUP BY i.type, i.sid HAVING COUNT(*) >= 1 ORDER BY score DESC LIMIT 0, 1 in /modules/search/search.module on line 942.
Comments
Comment #1
tseven commentedThe problem seems to stem from setting the search factor weight. Anything from the default 0 weight causes this error.
Comment #2
BlakeLucchesi commentedThank you for posting this bug. It looks like there is an issue with node access grants. The node access table (aliased here as na) is not joined. Also, this looks like its coming from the default search.module not the search_ranking.module. Make sure you have both the search and search_ranking module installed.
Comment #3
Misange commentedAny correction ?
I have the same problem but surprisingly it only occurs with all users except the admin. When logged as the admin, it runs nicely. Any idea ?
Misange
Comment #4
whytewolf commentedI'm also having this issue. doing a little debugging of my own shows that the $join1 variable has the node_access information passed to it at the start, but it is stripped out before the do_search function is called.
at this line.
$join1= implode(' ', $rankings['join']);
however the corresponding where clause information is not stripped out.
changing line 184 from
$join1= implode(' ', $rankings['join']);
to
$join1= implode(' ', $rankings['join']) . ' ' . $join1;
fixed the error for me. however more testing would be needed
Comment #5
corydorning commentedthis fixes the issue for me as well.
THANKS!
Comment #6
BlakeLucchesi commented