In SEO position, I am getting errors for all users except the admin (works fine for the admin). Works fine in other themes. Please help. Here's the error message. Can you tell me what it means and what is causing it? I'd really like to use this theme, but I can't without fixing this. Thanks.
user warning: Unknown column 'n.uid' in 'where clause' query: SELECT DISTINCT(n.nid) FROM node_comment_statistics n INNER JOIN node_access na ON na.nid = n.nid LEFT OUTER JOIN private_nodes pn ON pn.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 2 AND na.realm = 'forum_access'))) AND ((pn.nid is null OR n.uid=2)) AND ( n.comment_count > 0 ) ORDER BY n.last_comment_timestamp DESC LIMIT 0, 10 in /home/qualityw/public_html/thepoetryworkshop.com/includes/database.mysql.inc on line 172.
Comments
Comment #1
sterwa commentedthis problem is perhaps caused by private_nodes module which loads mysql too much with checking for every node that it is not private-- before deciding to give that node away to be displayed.
I added index key to the table to speed up the process. MYSQL never hung since.
Comment #2
sterwa commentedperhaps this should be cross-referenced as related to Private_nodes module.
Comment #3
yngens commentedsterwa, i have run onto the same problem, unfortunately your code in #1 did not help.
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNER JOIN blog_node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AN' at line 1 query: INNER JOIN blog_node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 50 AND na.realm = 'example_author'))) LIMIT 0, 5 in /home/mysite/public_html/includes/database.mysql.inc on line 172.even after i uninstall the module, the message error persists for all users except user #1 :( i really need to solve this asap, could you please help me just to get rid of this message.
Comment #4
drummThis module should probably use the node access system of grants and access records, see http://api.drupal.org/api/file/developer/examples/node_access_example.mo..., instead of implementing hook_db_rewrite_sql() itself. The n.uid column is not guaranteed to exist; n is not always {node}, just a table with an nid column.