Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Apr 2008 at 13:45 UTC
Updated:
8 May 2008 at 14:22 UTC
Hello,
I have used Views to create a new block associated to a taxonomy ID, but with anonymous users, i have got this error on front page :
user warning: Unknown column 'node.nid' in 'on clause' query: SELECT COUNT(*) FROM (SELECT DISTINCT(node.nid) AS nid, node.title AS node_title FROM node node INNER JOIN term_node term_node ON node.vid = term_node.vid WHERE term_node.tid = 21 ) count_alias INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 1 AND na.realm = 'node_privacy_byrole_role') OR (na.gid = 0 AND na.realm = 'node_privacy_byrole_user') OR (na.gid = 1 AND na.realm = 'forum_access'))) in /home.10.26/usidobn/www/modules/views/includes/view.inc on line 597.
Although i have this issue, the display of the block is correct.
With the authenticated user, i haven't got this issue.
Do you see the problem and its solution? Thanks.
Comments
Comment #1
merlinofchaos commentedThere appears to be a bug in core with node_db_rewrite_sql(); it is mangling the query. :/
That said I think I can add the count(*) part after the db_rewrite so that it won't have the opportunity to mess it up.
Comment #2
usidobn commentedHello,
I'm sorry but your modification hasn't got solve the problem. Now i have got:
Thanks for your work. Good luck.
Comment #3
merlinofchaos commentedWhoops. That was a different bug. Working at lightspeed trying to get to beta, and didn't notice when I tested it that I had the 'caching off' box checked, so it never did anything. I just checked in a fix.
Comment #4
usidobn commentedThat's work. Thanks! :-)
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.