Cannot figure this out to save my life.... tried out the module, not quite what we needed. Turned off, and then uninstalled, and subsequently completely removed.

Now any node that is edited or created produce an "Access Denied" message, even though anonymous users are set to view content. This happens no matter what we do as far as turning on or off permissions.

Looked at the database, the nodes that are edited or added completely disappear from the node_access table. If I add them in manually from PHPmyAdmin, the nodes then open up to the public.

Even the /user login page says access denied!

This is on a 2000 page live site, so as you can imagine, it's causing lots of problems.

I can restore the DB from last week, but it means we'll have to reproduce alot of content work.

Any ideas? Are any files changed in the install other than the DB?

-gripmedia

ps: and yes shame on me for trying on live site, but I have never had issues before turning on and off modules.

Drupal 5.0 RC1

Comments

jondoesdrupal’s picture

Your problem's most likely to be the node_access table, as that's what this manipulates.

3 suggestions:
- Go to admin > content management > post settings and hit 'rebuild permissions'
- Failing that try checking the node_access table, in a site which has no access control implemented I think it should have an entry of "0 0 all 1 0 0"
- Failing that, try restoring your backup elsewhere and comparing the node_access table and copying it across

If none of those work, i'm stumped. Fair while since I looked at this.

Hth. Cheers,

Jon

GripMediaDotNet’s picture

Howdy:

had to restore the database... just too much work I had to do... it definitely was in the DB. I didn't think to try rebuilding the permissions.

Just for your own knowledge, I have been able to reproduce this problem. SO something is getting left behind in the database.

When we added a new node, nothing would get written into the node_access table. If I added an entry manually thru PHPmyAdmin into the node_access table with the correct node ID, then the node became viewable.

So somehow, even when the module is removed and uninstalled, node_access was not getting written to to grant permissions.

Thanks for your quick response...

100lbgorilla’s picture

I ran into the same issue where I installed the module then decided to uninstall, and remove. Once I did that all the permissions were hosed. Access denied errors everywhere. (1000+page site)
The solution for my situation was to go to admin>content management>post settings>rebuild permissions and now it works fine.

deekayen’s picture

Component: Code » Documentation
Status: Active » Fixed

When I rewrote README.txt, I added the Rebuild permissions tip to the disable section. node_privacy_byrole_disable() should handle this automatically with a call to node_access_rebuild(), but I added an additional tip message and link to the rebuild page during the uninstall.

Drupal 6 seems to handle this cleanly, and is able to also check to see when it's sick, and will point you to the Rebuild permissions form, so node_access_rebuild() will be removed completely in Drupal 6.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

vigneshr35’s picture

I had the same kind of a problem...... Got a temporary solution though in just few hours itself. I had to update the node_access table everytime with the node that i editted so that i dont get such access denied message for users other than the administrators. Ex: If I editted , say node/x then i had to insert a row into node_access with the data 'x','0','all','1','0','0' ;, and this row would be deleted the next time I edit that node/x. This is Indeed Tedious and not the right remedy.....

But got a hint from here and just inserted a row with '0','0','all','1','0','0' which means that all nodes are granted access( for all roles ) , Inserted that row and things working normal and fine now. (Luckily we will not be editing the node/0 so that we have that row deleted as well from the node_access table...lol) .

vigneshr35’s picture

The second Suggestion in #1 solved the problem yet again for another Drupal installation. All working fine now. Cool.