Active
Project:
Menu Access
Version:
6.x-1.9
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
31 Mar 2009 at 18:53 UTC
Updated:
16 Jun 2011 at 10:28 UTC
Uninstall completely destroys my menu. This POS!
Comments
Comment #1
redijedi commentedIt also completely removes the menu admin menu item. WTF!
Comment #2
vm commentedtesting modules on a test installation is a best practice.
Being more polite typically gets you better responses from the community rather than being obnoxious.
have you tried clearning menu cache tables?
when you uninstalled did you use the uninstall tab?
if your site is borked you can roll back to the backup you took before you deployed this module.
Comment #3
redijedi commentedPolite? Fine. A production release module has a major bug and I'm wrong for being upset. I've manually deleted all content from all the cache tables. And I did run the uninstall. This isn't a small issue. The menu gets completely fubar'd.
Comment #4
vm commentedits a brand new module, it happens. Environments are different.
and the developer warns of this right on the project page:
Therefore if you didn't do, due diligence and test on a test site before installing on a production site .....
You very well may be the first person testing this new module as there is no usuage statistics for it at this time, as it is that new.
Comment #5
redijedi commentedYou're right. I changed the title, etc. I've settled down. I was very upset at first, but that was not the correct way to deal with it.
I manually went through every menu item and reset it. That seemed to correct it. Having said that, there does seem to be a bug that moves every menu item out of its nesting and puts you in this position when uninstalling.
Comment #6
emptyvoid commentedHmm, I have tested the uninstall process and this never happened before. I will setup a few testing scenarios and try to reproduce the issue. I may be a matter of clearing a value for each menu item during uninstall.
This will be kept open until I can verify the bug.
Comment #7
code-brighton commentedWARNING! Couldn't get this module to work, so I uninstalled, I now can't access any content under my primary menu as an unauthorised user, great! No idea why??
Comment #8
code-brighton commentedHmm after a bit of a trawl through the database and with the help of the devel module I found the "node_access" table was empty.
This need to contain at least one row and can be restored using the devel module.
Comment #9
peterconnolly commentedThere doesn't seem to be much activity on this issue, but last night the same thing happened to me; I uninstalled this module, and lost access to all menus. Big thanks to code-brighton for spotting the node_access table issue, which (thanks to a backup) got me up and running again.
Comment #10
zhahai commentedI encountered the same basic problem described in later posts here.
The node title is somewhat misleading - the problem was loss of access to all nodes (for everybody but the admin). The menu items went away as a side effect of the nodes not being accessible.
Also, in my case, the problem did NOT start upon uninstalling. All nodes became inaccessible (except to admin) as I was trying to configure the menu_access module. AFTER that happened, I disabled menu_access and menu_item_access, and uninstalled each - but still no nodes were accessible. Clearing cache also didn't help.
However code-brighton's observation was on the mark - creating that first record in the node_access table restored the site (I used phpmyadmin and just inserted the 0,0,all,1,0,0 basic record I found in my other sites).
This thread MIGHT reference two bugs (menus per se being destroyed on uninstall; node_access record being deleted during menu_access configuration).
I mention all this to help others in finding where that first entry in node_access got deleted - in my case, it didn't happen during uninstall but during configuration. I'm not even sure why table node_access should have been tampered with, as I had installed only module menu_access, not module node_access.
In any case, thanks code-brighton, that saved me some work.
Comment #11
faizwahid commentedI had a similar problem. The moment I enabled this module somehow some links (including Site building>Modules) in the admin navigation were lost.
Clearing the cache, watchdog tables & running upgrade.php didn't work.
On some deeper analysis I found that the table drup_menu_router did not have the necessary routing information. Copying the table content from a default installation worked and I was able to get back the missing menu items.
I'm still not sure what else is lost, so probably I'm going to take a backup of my data and reinstall drupal.
Comment #12
emptyvoid commentedIssue is the uninstall clears the the node_access table it should revert to the default drupal setting.
Need to investigate if this fubars other access modules that use the node_access tables.
Comment #13
emptyvoid commentedOk I have reproduced the error.
1) When the modules install three menus are automatically created, "menu access - primary", "menu access - secondary", "menu access - navigation"
2) The installation notes state that you should switch to using the menus with the prefix of "menu access". Doing so means that the security checks will be properly used within the site and your theme.
3) I reproduced the issue by uninstalling the modules without switching back to the default menus from within the block interface for your theme. If you don't switch back to the default Drupal versions of the menu the whole navigation system gets confused and the menus disappear.
Which makes sense because on uninstall all of the menus with the prefix of "menu access" are deleted from the system.
!!! -- Solved -- !!!
So to prevent the system from going crazy you should first switch your menus back to the default Drupal menus then uninstall the modules.
Comment #14
emptyvoid commentedOn a similar note I am researching using "hook_menu_alter" instead of the totally separate set of menus my goal is to start a Drupal 6 2.0 branch soon and a 1.0 for Drupal 7. So I am researching this alternative that will dynamically apply security to any menu or menu item within the system.
Comment #15
altavis commentedI've disabled Access menu blocks, enabled normal ones, uninstalled and all I've got are links out of the menus. Every single navigation link is now in a root menu.
Comment #16
emptyvoid commentedOk that is really screwed up could you list the other modules you have installed?
Comment #17
krishnaa commentedthnaks code-brighton
your suggestion worked great for me.
Comment #18
GeekyLass commentedI'm subscribing to this issue as I plan to un-install menu access and until this particular issue is resolved I'll just leave it.
Comment #19
vm commentedsounds like what is needed after disabling this module is for the node access table to be reset which can also be done in drupal core in administer -> post settings
Comment #20
GeekyLass commentedDoes anyone know if this is resolved in the dev version?
Comment #21
aldim commentedI had the same problem. In my case I needed to rebuild permissions for users.
Administer -> Post settings -> Rebuild permissions.
Aldim.
Comment #22
ansari.wajid commentedGreat aldim, Rebuilding permissions worked for me..
Thanks
Comment #23
emptyvoid commentedhmm, perhaps I could add the rebuilding of permissions function call on uninstall?
Comment #24
ludo.rI confirm, i just had the same issue.
Uninstalling this module just deleted all items from my primary-links menu!
Comment #25
michael.lee.baker@gmail.com commentedI had an issue on uninstall where it removed my Primary menu - AND - when I logged out, the default "Welcome to your new drupal website" was the homepage. I noticed the node_access table was now empty so I had to manually insert a row into table "node_access" with the following defaults:
nid = 0
gid = 0
realm = all
grant_view = 1
grant_update =0
grant_delete =0
UPDATE - I just noticed that this table is wiped out when configuring the modules menu settings. Not necessarily on uninstall.
Comment #26
emptyvoid commented#michaelleebaker please provide more information?
Are you saying that when you go to modify the menu settings for a menu that the table looses all records?
It is just related to one menu or all registered menus?
Please provide more information.
Comment #27
int_ua commentedYes, I have empty node_access after uninstalling 6.x-1.9 too.
But I'm not sure if it was not empty before uninstalling. But it was not empty before adding menu_access module, that's fact.
Comment #28
int_ua commentedSkimming through both _uninstall() functions I cannot find anything related.
Comment #29
int_ua commentedReproduced it.
Try to go to /admin/build/menu/menu_access and just save the settings. For me it does purge node_access.
Comment #30
int_ua commentedI hope you don't mind if I change the status. Right now I have no time for reading code as we have passed the deadline. Will try later.