I created a very basic CCK content type (titled "News") that has no additional fields other than Title and Body, and I then created a view that displays that items as a Teaser List. When I go to that view now, I get the following error message:

user warning: Unknown column 'grant_edit' in 'where clause' query: SELECT COUNT(*) FROM node_access WHERE (nid = 0 OR nid = 17) AND ((gid = 0 AND realm = 'all')) AND grant_edit >= 1 in /home/campfire/public_html/members/includes/database.mysql.inc on line 172.

The problem is, there is no grant_edit column in node access. There is grant_update, but not grant_edit. I'm not sure if this is in the Views code or the core code.

Comments

merlinofchaos’s picture

Status: Active » Closed (won't fix)

Actually, this could be in any number of modules, but it is definitely not Views and probably not CCK either.

What is happening with the node access table is that the query is being rewritten by db_rewrite_sql; node_access table happens during node_db_rewrite_sql() hook, but it gets information from all modules. It should be looking for grant_update; so this suggests that some access-related module has a bug in it, where it is using the keyword 'edit' in place of 'update'. Perhaps in a node_access('edit') call or something along those lines.

This one is going to be tough to find; you'll probably want to disable access-related modules 1 by 1 and repeat the query in order to figure out which one is causing this.

But I am quite sure this isn't a Views problem.