Simply enabling this module caused access denied responses on the entire site. Tried updating permissions for the node type I was originally working with, but that did not change anything. What am I missing here? We have a fair number of contributed modules in use on this site, I'm assuming there is a conflict somewhere. Just wondering if anyone else has run into this?

Comments

jcalais’s picture

I can verify we are seeing the same problem on our site. Investigating further.

jcalais’s picture

Priority: Major » Normal

I 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.

entendu’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Deprecating 6.x.