after activating this module i having this error message:
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 = 0 AND na.realm = 'og_public') OR (na.gid = 80 AND na.realm = 'og_admin') OR (na.gid = 2 AND na.realm = 'forum_access') OR (na.gid = 4 AND na.realm = 'forum_access'))) AND ( node.type = 'blog' AND node.status = 1 AND node.uid = 3 )ORDER By node.created DESC in /var/www/web3/html/sites/all/modules/advanced_blog/advanced_blog.module on line 390.

CommentFileSizeAuthor
#15 authorisations.jpg147.58 KBLutetienND

Comments

eidolon night’s picture

I'm having trouble duplicating this. What modules are you running?

Babalu’s picture

palo’s picture

I received the same error.

eidolon night’s picture

Thanks for that list. From the looks of that message, there is some sort of conflict with the organic groups access control. I'm setting up a test environment for it now. palo, are you also running the organic groups access control module?

rhache’s picture

I have a slightly different error, but it looks related:

user warning: Unknown column 'node.nid' in 'field list' query: SELECT node.nid, node.created FROM default_node WHERE node.type = 'blog' AND node.status = 1 AND node.uid = 1 ORDER By node.created DESC in /Users/rhache/Sites/test/newmodules/sites/all/modules/advanced_blog/advanced_blog.module on line 390.

I don't have OG installed on my system, but there seems to be the same reference to node id.

btw, really nice module. Glad someone finally came up with this.

Thanks,
Rene

Aerodynamo’s picture

I am not sure if my issue is related or unrelated, but upon loading the module and enabling it, I receive:

Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /home/content/b/d/r/bdrelling/html/modules/advanced_blog/advanced_blog.module on line 671

Any ideas?

fleetcommand’s picture

I also get a warning:
user warning: Unknown column 'n.language' in 'where clause' query: SELECT node.nid, node.created FROM node WHERE (n.language ='hu' OR n.language ='' OR n.language IS NULL) AND ( node.type = 'blog' AND node.status = 1 AND node.uid = 1 )ORDER By node.created DESC in /home/hub/www/public/elite/sites/all/modules/advanced_blog/advanced_blog.module on line 390.

But it's only when I enable the block "Advanced Blog: navigation".

EDIT:

Oh, and also, the block looks like this:
title: fleetcommand's blog
link: fleetcommand's blog
text: Posts

I guess the Posts also should be a link or whatever it's intended, probably the sql error stops it from further processing.

Aerodynamo’s picture

Ignore me here, I fixed this by change my PHP language version from 4 to 5 through my website. I swore I did this initially, but I suppose I did not.

eidolon night’s picture

Status: Active » Postponed (maintainer needs more info)

I'm having trouble duplicating the above. Please try to narrow down which modules are causing a conflict if possible.

Also, can anyone confirm the PHP 4 vs 5 issue? I will add the PHP 5 requirement if necessary.

Aerodynamo’s picture

My specific PHP 4 to 5 fix was only necessary for certain modules. I notice some modules will specify, while others do not.

I suggest upgrading anyway--it cannot hurt, especially since most of the higher-end modules require PHP 5 to run correctly.

I could be wrong, so wait for more confirmation!

ycwjjjj’s picture

i got this error too.
Authorized users click more (e.g. blog/$uid) on blog block to show advanced_blog/list.
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 = 0 AND na.realm = 'og_public') OR (na.gid = 2 AND na.realm = 'forum_access'))) AND ( node.type = 'blog' AND node.status = 1 AND node.uid = 1 )ORDER By node.created DESC in C:\xampp\htdocs\drupal0pro\sites\all\modules\advanced_blog\advanced_blog.module on line 391.

Rafael Cansinos’s picture

I have this problem with two modules:
Advanced Blob + Nodeaccess
Advanced Blob + Simple Access

The same problem.

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 = 0 AND na.realm = 'simple_access_author'))) AND ( node.type = 'blog' AND node.status = 1 AND node.uid = 1 )ORDER By node.created DESC in /home/paraprensanet/drupal1.paraprensa.net/html/sites/all/modules/advanced_blog/advanced_blog.module on line 390.

----

I have a Blog with Advanced blog module.

I would like to hide in my blog some nodes to anonymous user, but I like to see this nodes when I am authenticated like administrator.

I installed Nodeaccess module:

When I am authenticated like administrator user everything works fine.

If I have a node marked in “Grant” to view, edit and delete only by the administrator when I log out, and I am an anonymous user, if I go to “nameuser's blog” I get the error
---
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 = 1 )ORDER By node.created DESC in /home/xxxxxx/drupal1.xxxxxx.net/html/sites/all/modules/advanced_blog/advanced_blog.module on line 390.
---

and the scheme of Advanced Blog:

2009
June (3)
May (5)
April (1)

disappear, it is not there. If I deactivate the module Nodeaccess everything works again.

Rafael Cansinos’s picture

Title: Error » Advanced Blog + Nodeaccess & Advanced Blog + Simple Access = Error
Status: Postponed (maintainer needs more info) » Active
tryitonce’s picture

Same or similar problem here with the following error:

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 'ORDER By node.created DESC' at line 1 query: SELECT node.nid, node.created FROM node WHERE node.type = 'blog' AND node.status = 1 AND node.uid = ORDER By node.created DESC in C:\wamp\www\drupal6\sites\all\modules\advanced_blog\advanced_blog.module on line 390.

Running WampServer 2.0 with a range of modules related to node access.

I also noticed that in the Blg Navigation module the user name has been lost instead of showing:
myname's blog =>>> 's blog (both in heading and in first line of the links). - The links work properly.

Unfortunately the module seems not ready and I have to turn it off for now - hope to be able to activate it before too long!

Thanks - great work - let me know if I can help a bit more ...

LutetienND’s picture

StatusFileSize
new147.58 KB

I have been experiencing the exact same message. When Simple Access and Node Access are turned OFF, Avanced Blog works fine in my installation (I am just using the Advanced Blog:navigation block so far) regardless to which role the user belongs to.

However, when Simple Access or Node Access are turned ON, Avanced Blog works fine when a user is connected as an admin and not when he is connected in a role without admin authorizations. See attached file for the permissions that are currently set in my site.

I have been looking into the advanced_blog module code, but I am afraid that I'm too new too the Drupal environment to understand what is happening.

The avanced blog module is extremely useful to build a decent-looking blog... I am trying to set-up a private blog (reserved to users with certain roles) in a Drupal site and I have not found any way to do that properly.

Is there a way to correct this issue ?

BR

LutetienND’s picture

OK. I have spent some time playing with the permissions. I started to grant all the permissions to my "non admin" role. The problem disappeared. Then I untoggled all permissions until the problem reappeared. The conclusion is that

When using the Node Access module in conjunction with the Advanced Blog module, you need to grand Administer nodes permission to all roles which need to see an Advanced blog block.

It now works for me.

That being said,it does not look obvious to me that a simple visitor should have that Administer node permission. I am not sure what other right (besides that of seeing the Advanced blog) this will give to my visitors. Any ideas?

BR

tryitonce’s picture

Thanks for all the work that went into isolating the problem.
Now we just need someone knowledgable to resolve it.

Sorry, I can't help with this .....

svendecabooter’s picture

Status: Active » Fixed

The advanced_blog module was incorrectly using the db_rewrite_sql function, which made modules that rely on the node access control abilities of Drupal throw out errors. This is now fixed in the latest commits. Please check the upcoming new version of advanced_blog to get this fixed.

Gökhan DAĞ’s picture

6.x-1.0-beta2 version of the problem is still continuing. Not only forum access module, and also with access node also incompatible with the content access module.

I hope it improves.

svendecabooter’s picture

Status: Fixed » Active
svendecabooter’s picture

Status: Active » Fixed

This should be related to #793876: User error in the blog page alerts. Let me know if it works for you in the beta3 release

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.