Background:
I accidentally copied Node Privacy by Role into the /modules directory, then realizing that I should install this module into the /sites/all/modules directory, I deleted the NPbR in the /modules directory then copied MPbR into the /sites/all/modules directory. I guess drupal instantly detect both installations. When I installed the module from the admin interface, drupal seemed to be looking in the /modules directory and gave me an error. So I copied NPbR back into the modules directory and still left the NPbR in the /sites/all/modules directory. It then installed properly and seemed to work.

Problem:
I didn't like the module and decided to uninstall, which seemed to go fine. But then, when I created new content pages, everyone was locked out. After doing some investigation, I realized that new page content pages where not being created with an entry into the node_access table in MySQL. I manually created corresponding entries in that table and the content displayed.

Question:
How can I get Drupal to create entries again in the node_access table when I create content?

Comments

dchinen’s picture

wessex’s picture

I've just been bitten by this too. I deactivated the module and uninstalled it. I then removed the module. Every node that I edited afterwards disappeared to all users but admin.

Hope the uninstall can be fixed!

rimu’s picture

Yep I have this problem too, on 6.2.x

I am seriously unimpressed.

mantyla’s picture

Project: Nodeaccess » node privacy byrole

You had the wrong project - this has nothing to do with Nodeaccess.

rimu’s picture

yep sorry, i meant node privacy by role...

deekayen’s picture

I'm not finding a software bug anywhere... if anything I'm seeing a documentation issue.

The simplest way I reproduced this was:

  1. Install D5
  2. Activate npbr
  3. Uninstall npbr
  4. Create a page node

At this point, node_access was empty. Run Rebuild Permissions at Administer, Content Management, Post Settings (admin/content/node-settings). It makes a single entry in node_access which is all Drupal needs to run normally. If you have any other custom access modules in use, node_access table is at their mercy. The best way to tell is if any of your addon modules have a function name that ends with "_grants".

During the uninstall process, it sets a message on the screen that says "TIP: If all your nodes say access denied, it may be necessary to [rebuild permissions | link to admin/content/node-settings]." Is there something else that would have improved this?

@rimu: between http://drupal.org/node/246162 and http://drupal.org/node/153998 I don't take any guesses at what happened to your node access rights, but give rebuild permissions a try. I have postponed all 6.x issues on npbr till 6.3 is out.

deekayen’s picture

Status: Active » Postponed (maintainer needs more info)

please report back

dchinen’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Guys, thanks for all of your help. I hired a Drupal expert and she, Kitt Hodsden, whom I highly recommend, was able to get the module uninstalled. From what I remember she had to go into the MySQL db to delete some entries. I never would have figured it out on my own.

If you need a good Drupal developer, let me know. I can get you Kitt's info.