ERROR is:
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 = 1 AND na.realm = 'nodeaccess_rid') OR (na.gid = 0 AND na.realm = 'nodeaccess_uid') OR (na.gid = 0 AND na.realm = 'nodeaccess_author'))) AND ( node.type = 'blog' AND node.status = 1 AND node.uid = 7 )ORDER By node.created DESC in /****/****/****/***/sites/all/modules/advanced_blog/advanced_blog.module on line 390.
VERSION: Advanced Blog 6.x-1.0-beta1
Some discussion to resolve this seems to have isolated the problem to its compatibility with NodeAccess module which manages access to pages.
The problem does Not occur as admin. It only occurs as an anonymous or other user. The nodeaccess module can be found at: http://drupal.org/project/nodeaccess (a very good and simple to use module - ideal for non-tech-savvy users in charities sector)
An example of this error can be found at: http://www.lokraj.org.in/lrsblog
I love the module! Hopefully we can fix this bug.
Warm regards,
Raj
Comments
Comment #1
simon georges commentedHi,
Could you try replacing
$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";
by
$query = "SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 AND n.uid = " . $account->uid . " ORDER By n.created DESC";
on line 390 ?
I haven't the case on my installation, so I can't test it, but I'd like to help and provide a proper patch if this (apparently benign) modification should do the trick.
Best Regards,
Comment #2
simon georges commentedPatch is available at http://drupal.org/node/621110.
Flagging this one as duplicate.