Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
platform: php-5.3.2, mysql-5.1.48, drupal-6.17
I installed the modules domain, domain_adv, nodeaccess, og and some other modules.
After I rebuild the permissions (admin/content/node-settings/rebuild), the anonymous user has access to every node.
mysql> select * from node_access where nid=0;
+-----+-----+-------------------+------------+--------------+--------------+
| nid | gid | realm | grant_view | grant_update | grant_delete |
+-----+-----+-------------------+------------+--------------+--------------+
| 0 | 0 | domain_all | 1 | 0 | 0 |
| 0 | 1 | nodeaccess_author | 1 | 1 | 1 |
| 0 | 1 | nodeaccess_rid | 1 | 0 | 0 |
| 0 | 2 | nodeaccess_rid | 1 | 0 | 0 |
+-----+-----+-------------------+------------+--------------+--------------+
If I modify the table manualy (delete from node_access where nid=0 and realm="nodeaccess_rid" and gid=1;) the node access for the anonymous user is OK.
What setting should I change?
How can I find the piece of code that sets the grant_view for nid=0, realm=nodeaccess_rid?
Comments
Comment #1
rblomme CreditAttribution: rblomme commentedI had a corrupt entry in the node and node_revisions table (empty title, body, teaser of a filebrowser node):
The timestamp is the day when I converted my drupal-4.7 site to 6.13.
I found this corrupt record using the following debug code in node.module:
The output showed $node->nid was NULL (not 0) at this point and vid=2085.
I removed the record in both tables. After I rebuild the permissions (admin/content/node-settings/rebuild):
Problem solved!