Active
Project:
Node Access
Version:
6.x-1.8
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
27 Oct 2009 at 21:06 UTC
Updated:
17 Jan 2012 at 17:38 UTC
Jump to comment: Most recent
When I uninstall this module, all of my primary links go away. I was able to reproduce this 3 times.
Comments
Comment #1
Yuki commentedSame in here...pls help us..
Comment #2
kevinquillen commentedFortunately I was doing this on a development site with a db backup ready. A very unexpected result- why does it do this?
Comment #3
emptyvoid commentedThere is an uninstall bug for this module.
I am assuming the links in your primary menu point to nodes yes?
Well currently uninstalling the module clears the node_access table and users loose access to view any content.
Resetting the node_access table to the default value fixes the issue.
Enter a single record into the table that has the following values.
0 0 all 1 0 0
Comment #4
wqmeng commentedI have tried the newest 1.8 version, The problem still there, though have reset the node_access table with the default value, while the primary links have been deleted by this module when uninstall it. Could you recheck it? I use the default theme.
Comment #5
bredi commentedsame here. ouch.
was trying out node access vs content access. still confused by the two btw.
Comment #6
emptyvoid commentedMaking sure I look into it.. the work around seems to work for me..
When in doubt always make a backup first (yes this is an excuse I will try to get a fix).
Comment #7
perlan commentedHow can this module be a stable mudule when the effect of uninstalling the module deletes all your primary links?! By uninstalling this module that I don't wish to use anymore I just deleted my hole sites information structure! Many thanks!
Comment #8
Yuki commentedNo idea I have lost all my data and restored again...without checking properly it should not be listed as a final release.
Comment #9
aaronbaumanComment #10
Anonymous (not verified) commentedJippi! :)
I think this happening because
$items['node/%node'] on line 116.
Node Access module takes control over node, and when uninstalling Node Access. The core thinks all nodes is Node Access items, and delete those.
Backup!
Uncomment:
/*
$items['node/%node'] = array(
'title callback' => 'node_page_title',
'title arguments' => array(1),
'page callback' => 'node_page_view',
'page arguments' => array(1),
'access callback' => 'node_access_access',
'access arguments' => array('view', 1),
'type' => MENU_CALLBACK,
'file' => 'node.pages.inc',
'file path' => drupal_get_path('module', 'node'),
);
*/
This work for me.
Comment #11
emptyvoid commentedComment #12
emptyvoid commented@Touchen I'm a little confused do you mean that you uninstalled the module and uncommented that code block in the hook_menu and everything worked? (scratches head)
Comment #13
casc-or commentedAnother person here bitten by the uninstall removing all primary links (and a few other things besides it seems - node/add for instance doesn't display any content types to be added, the administration menu is scrambled ...)
Adding the default record into the node_access table does nothing for me - in fact, it's already there.
It's compounded by the fact that my db backup seems to be unrestorable ... not a good day.
Welcome any suggestions on how to rescue this.
I don't follow Touchen's comment above - was this applied after the menus were destroyed to repair them? Where is it applied?
Comment #14
emptyvoid commentedSo can you log into Drupal and navigation to the admin section?
1) I in the node_access table in the DB check if it is empty if it is add a row (0 0 all 1 0 0)
2) Go to posting settings and rebuild the permissions
Comment #15
blackdog commentedIndeed #10 works. Do that before you uninstall the module, and all is fine.
Why are you overriding the whole menu item for node/%? It's clearly not the correct way. Content Access module doesn't do it that way, for example.
Comment #16
emptyvoid commentedGood catch, perhaps I could explicitly set the access values to the Drupal default before the uninstall completes?
For those reading, if you actually read my module description I recommend using Content Access instead of this module. The module is still available because of legacy requirements for my clients. Also FYI there will not be a D7 release of this module so you have been warned.
http://drupal.org/project/node_access <-- read the description it says it all.
Comment #17
jamesrutherford commentedIf you are confused by the instructions in #10, here is what worked for me. Make sure Node Access is enabled.
Make a complete backup of your Drupal database. I would advise doing this on a dev server first.
In node_access.module comment out the menu item declaration starting on line 116 ending on 126. Like so:
/*
$items['node/%node'] = array(
'title callback' => 'node_page_title',
'title arguments' => array(1),
'page callback' => 'node_page_view',
'page arguments' => array(1),
'access callback' => 'node_access_access',
'access arguments' => array('view', 1),
'type' => MENU_CALLBACK,
'file' => 'node.pages.inc',
'file path' => drupal_get_path('module', 'node'),
);*/
Go to /admin/content/node-settings and choose rebuild content permissions. Then flush all your caches.
You should now be able to uninstall node access without losing any menu data.
Comment #18
stewart.adam commentedThis bug can cause serious data loss on production sites if the user isn't aware of this issue and hasn't made a backup before uninstalling the module. It has been known for over two years and the release is still marked as stable.
Maintainer, please mark the release as unsupported!