Not Displaying Pages
root_of_roots - June 20, 2008 - 20:54
| Project: | View Reference |
| Version: | 6.x-1.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | duplicate |
Jump to:
Description
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 :(.

#1
I 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.
#2
...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.
#3
if 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
#4
Where 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
SELECT name, position FROM viewreference AS n?
#5
sorry 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:
INNER JOIN node_access na ON na.nid = n.nidWHERE (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')))
this problem is only for anonymous user (guest).
no problem for alle without node privacy byrole.
saluti
roberto
#6
That 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
#7
Thank you for this, I copied those problems from a previous version of CCK somewhere :(
Will fix on next update.
#8
dupe of http://drupal.org/node/279841