Closed (duplicate)
Project:
View reference
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Jun 2008 at 20:54 UTC
Updated:
23 Aug 2008 at 04:23 UTC
Hey,
My site seems to ONLY be displaying some pages for the account admin. Even the account with most privileges cannot see some pages. about 8/11 pages are only displaying for the site admin. Any ideas what this could be? When I log out the primary links and navigation disappear with the exception of an empty forums page - a homepage, and blog page with one post that does not display for non-members (that post has been promoted to frontpage and does not appear for nonmembers).
Any ideas what the problem is or how to fix it. Its probably just me not seeing past my nose at something obvious :(.
Comments
Comment #1
deekayen commentedI think the best you can do is campaign for Drupal 6.3 to release because I'm not entirely sure what is not working as a result of bugs fixed in it. ACL module guys have been documenting some of the access bugs in 6.2 core.
Comment #2
deekayen commented...and all of these things started happening after node privacy by role was installed? The primary links and navigation have nothing to do with the node permissions system this module works with.
As for the node the users can't see on the front page, your nonmembers will need to have both access content permission in the Administer > User Management > Permissions section as well as have checked the anonymous user view checkbox on the individual node in the View/Edit Permissions collapsed fieldset when you're editing the node.
Comment #3
roberto.ch commentedif i have viewreference field in cck-nodetype, guest cannot
see the viewreference field, but very red;) following.
the part of access-control is between #...#
user warning: Unknown column 'n.nid' in 'on clause' query:
SELECT name, position FROM viewreference
#[part of access-control]
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 = 'node_privacy_byrole_role')
OR (na.gid = 0 AND na.realm = 'node_privacy_byrole_user')))
#[/part of access-control]
AND ( view_id = '1')
after removing node privacy byrole, all are ok.
all permissions are ok.
Drupal 6.3
Content Construction Kit (CCK) 6.x-2.0-rc4
View Reference 6.x-1.1
Views 6.x-2.0-rc1
node privacy byrole 6.x-1.3
saluti
roberto
Comment #4
deekayen commentedWhere did that query come from? You never aliased a table as n for n.nid to work. I don't see it in viewreference and there's certainly no special case for it in npbr.
did you mean
?
Comment #5
roberto.ch commentedsorry i forgot, was the frontpage.
is the line 165 in viewreference.module
$view = db_fetch_object(db_query(db_rewrite_sql("SELECT name, position FROM {viewreference} WHERE view_id = '%d'"), $element['#item']['view_id']));the replacement for %d is:
$element['#item']['view_id']));is substituted with:
this problem is only for anonymous user (guest).
no problem for alle without node privacy byrole.
saluti
roberto
Comment #6
deekayen commentedThat clears it up. View Reference maintainer needs to re-evaluate their usage of db_rewrite_sql().
http://api.drupal.org/api/function/db_rewrite_sql/6
Comment #7
danielb commentedThank you for this, I copied those problems from a previous version of CCK somewhere :(
Will fix on next update.
Comment #8
danielb commenteddupe of http://drupal.org/node/279841