Closed (won't fix)
Project:
View Unpublished
Version:
6.x-1.3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Mar 2013 at 19:05 UTC
Updated:
30 Oct 2014 at 23:33 UTC
Jump to comment: Most recent
Comments
Comment #1
jcalais commentedI can verify we are seeing the same problem on our site. Investigating further.
Comment #2
jcalais commentedI have an explanation: Enabling the module makes no changes to the node_access table, even though both hook_view_enable and hook_view_disable sets node_access_needs_rebuild(TRUE);
When I *disable* the module, I get a message saying node access has been rebuilt and a row will appear in the db-table node access that has the values nid=0, gid=0, realm=all, grant_view=1, grant_update=0, grant_delete=0.
Reading through the core node.module (line 3072), when there isn't any module implementing node_grants (as may be the case when we disable this module), the default behavior is to allow all users to view published content without regard for what's in node_access.
So while the module is disabled, that db row is unnecessary (I think) and when we re-enable it, the line stays in the db and fixes the problem with all pages being inaccessible to all users, since the node_access isn't rebuilt when you enable the module.
I don't know why enabling the module didn't rebuild node_access, but I know we have 500 000 nodes and rebuilding takes quite a while.
Tl;dr: Disabling and re-enabling the module fixed it for us, because it made a row appear in the node_access table.
Edit: Sorry... we saw the same problem in D7, so my comment is actually relevant for that version and not D6. My bad.
Comment #3
entendu commentedDeprecating 6.x.