Hi,
I've just installed advanced_blog. It seems to do the right thing when user is admin but when user is a user it gives the following error:
<quote> user warning: Unknown column 'n.nid' in 'on clause' query: SELECT node.nid, node.created FROM node INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 4 AND na.realm = 'content_access_author') OR (na.gid = 2 AND na.realm = 'content_access_rid') OR (na.gid = 3 AND na.realm = 'content_access_rid') OR (na.gid = 5 AND na.realm = 'content_access_rid') OR (na.gid = 2 AND na.realm = 'forum_access') OR (na.gid = 3 AND na.realm = 'forum_access') OR (na.gid = 5 AND na.realm = 'forum_access'))) AND ( node.type = 'blog' AND node.status = 1 AND node.uid = 4 )ORDER By node.created DESC in /var/www/qdcc-real/sites/all/modules/advanced_blog/advanced_blog.module on line 390. </quote>
Curiously when I look at line 390 in advanced_blog.module it doesn't look like that at all. It looks like:
<quote> $query = "SELECT node.nid, node.created FROM {node} WHERE node.type = 'blog' AND node.status = 1 AND node.uid = " . $account->uid . " ORDER By node.created DESC"; $result = db_query(db_rewrite_sql($query)); </quote>
I'm a bit perplexed by this; I can't find a query similar to the quoted error query in the advanced_blog.module.
It seems to be related to the advanced_blog:navigation block as when that is not used the error goes away.
I was hoping somebody could help me understand what is going on here.
Dick
On Sun, Feb 28, 2010 at 3:11 AM, Dick Middleton dick@fouter.net wrote:
Hi,
I've just installed advanced_blog. It seems to do the right thingwhen user is admin but when user is a user it gives the following error:
<quote> user warning: Unknown column 'n.nid' in 'on clause' query: SELECT node.nid, node.created FROM node INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 4 AND na.realm = 'content_access_author') OR (na.gid = 2 AND na.realm = 'content_access_rid') OR (na.gid = 3 AND na.realm = 'content_access_rid') OR (na.gid = 5 AND na.realm = 'content_access_rid') OR (na.gid = 2 AND na.realm = 'forum_access') OR (na.gid = 3 AND na.realm = 'forum_access') OR (na.gid = 5 AND na.realm = 'forum_access'))) AND ( node.type = 'blog' AND node.status = 1 AND node.uid = 4 )ORDER By node.created DESC in /var/www/qdcc-real/sites/all/modules/advanced_blog/advanced_blog.module on line 390. </quote>
Curiously when I look at line 390 in advanced_blog.module it doesn't look like that at all. It looks like:
<quote> $query = "SELECT node.nid, node.created FROM {node} WHERE node.type = 'blog' AND node.status = 1 AND node.uid = " . $account->uid . " ORDER By node.created DESC"; $result = db_query(db_rewrite_sql($query)); </quote>
I'm a bit perplexed by this; I can't find a query similar to the quoted error query in the advanced_blog.module.
It seems to be related to the advanced_blog:navigation block as when that is not used the error goes away.
I was hoping somebody could help me understand what is going on here.
Dick
-- Dick Middleton dick@fouter.net PGP Key ID: 0x9F9434FD -- [ Drupal support list | http://lists.drupal.org/ ]
Nilesh Govindarajan wrote:
I've just installed advanced_blog. It seems to do the right thing when user is admin but when user is a user it gives the following error:
Excellent, thanks for that. Now it's fixed!
Dick