Hi Nancy,
since I've installed 6.x-1.1 in D6.4, every user who has not the permission to access site notes (these are the 'unauthorized visitor' as well as all registered users but #1 on my test site) gets the message on every page:
user warning: Unknown column 'type' in 'where clause' query: SELECT DISTINCT(nc.nid) FROM node_comment_statistics nc INNER JOIN node_access na ON na.nid = nc.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 1 AND na.realm = 'node_privacy_byrole_role') OR (na.gid = 0 AND na.realm = 'node_privacy_byrole_user'))) AND (type <> 'sitenotes') AND ( nc.comment_count > 0 )ORDER BY nc.last_comment_timestamp DESC LIMIT 0, 10 in /var/www/vhosts/example.com/httpdocs/modules/comment/comment.module on line 314.
The only bypass I can see to get rid of this message: to grant everyone the permission but to deprive them of the reachability... as far as possible...
Comments
Comment #1
Garnerin commentedThe warning keeps displaying with the dev version of 2008-Sep-17 just as well.
Comment #2
stevenghines commentedI'm getting it as well with 5.x-1.4; error message is
Comment #3
nancydruI committed a fix to tighten up my checks on which db_rewrite_sql's I intercept. This should be in the -dev release that rolls out around midnight GMT. Please test it and make sure. Thanks.
Comment #4
markus_petrux commentedWhile the last patch seems to fix the problem, there may be situations where
$primary_tablehas a different value, so this would expose sitenotes nodes to other users.Instead, you could use the value in
$primary_tableto append sitenotes condition.Comment #5
nancydruGood point, thanks.
Comment #6
jupiterchild commentedI am running 5.x-1.4 on 2 sites. On one site I get the same error as #2 on the other site Site Notes works fine.
Comment #7
nancydruYou need the -dev version.
Comment #8
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.