Hi

I've been playing with some other modules, and have been enabling and disabling access control

Now it's broken. Only the administrator can access a particular page, for anyone else (who have access permission), the following error is returned:

user warning: Unknown column 'n.nid' in 'on clause' query: SELECT title 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 = 3 AND na.realm = 'content_access_author') OR (na.gid = 2 AND na.realm = 'content_access_rid') OR (na.gid = 4 AND na.realm = 'content_access_rid'))) AND ( type='course') in C:\Inetpub\wwwroot\www.absa.net.au\Training\dev\tng_reg_dev\includes\database.mysql.inc on line 174.

Unauthorised users get the standard 'Access denied' message.

It only happens to one particular node. I've tried deleting the node and re-creating it, but the problem doesn't disappear.

Any ideas?

Thanks

Glenn

Comments

fago’s picture

Status: Active » Closed (won't fix)

The problem is the (custom?`) query - it's not written in the way it should be so that db_rewrite_sql() works as the alias n is missing.

glennnz’s picture

@fago

How do I fix this? It was working fine, and I've not made any changes to the code, and now it doesn't...

Glenn

--Update--

Found and fixed

Thanks