menu per role is not working at all for me - it is turned on in modules, and when I edit a menu I see the 'restrict access' section and can check off roles, but if for example I leave anonymous un-checked (I verified my check boxes were saved by going back in to the menu).

I still see the menu option when not logged in (have cleared cache, etc.)

I have tried both primary links and navigation.

I have tried node style links and URL links (to external site), no difference.

Any ideas?

#10 Screenshot.png31.91 KBAlexisWilke
Members fund testing for the Drupal project. Drupal Association Learn more


siteograf’s picture

I have the same problem with Drupal 6.11.

AlexisWilke’s picture

The primary links use the special variable called $primary (like $secondary) so that could explain the problem.

However, the Navigation menu is a regular block. So that should not be a problem.

I suggest you try with another home made menu just to confirm that it is a problem there too.

I have tested on a brand new clean website and I just cannot reproduce your problem.

Do you, by any chance, run other menu related modules? There are now 2585 3rd party modules for D6 you know...

Thank you.
Alexis Wilke

plan9’s picture

I also have this issue with the primary menu on 5.19 No menu items can be hidden from anonymous users. I have no other menu related modules.

AlexisWilke’s picture

I'm not running 5.x... (also if you have some cash on hands, I can always help... 8-) )

You may want to try creating a different menu if you are currently using the Primary or Secondary and see whether that solves your problem. Either way, a note about the result would be great!

Thank you.

tfmedia’s picture

I had the same issue in 5.x, downloaded the package, unzipped and uploaded the folder and enabled the module but the menu did not change after restricting to roles.

It isn't entirely clear that you also need to read the readme.txt inside the folder. A small modification is needed to the drupal core for this module to work. After I had done that, it works fine.

Thanks. :-)

AlexisWilke’s picture

Hi Guys,

Note that there is mention of the problem on the info page of the module, under Drupal 5, Installation... (and no, I did not add that recently)

Thank you.
Alexis Wilke

theprodigy’s picture

Version: 5.x-1.x-dev » 6.x-1.3

I am using 6.14 and the primary menus where working with anonomous unchecked. I am not sure what happened but now they do not work. I would suspect this could be a conflict with another module.

AlexisWilke’s picture

Version: 6.x-1.3 » 5.x-1.x-dev

Hi theoracleprodigy,

This issue is for people using 5.x, so I prefer to keep the version to 5.x so that way it help people using 5.x to find what they may be doing wrong.

You are not otherwise giving us enough information to really be able to help you... but feel free to create a new issue for 6.x and you may want to upgrade to 6.15 too. That won't help with this module, but there are a few security issues fixed in 6.15 core.

Thank you.

mimrock’s picture

Version: 5.x-1.x-dev » 6.x-1.9

I'm using drupal 6.20 with menu per role 6.x-1.9.

The forms are there, but when I try to hide a menuitem from logged in users (Tried it with hiding the menuitem from authenticated users and show menu item only to selected roles: anonymous user) it still shows it to everyone. The menu item is in the primary links.

AlexisWilke’s picture

Version: 6.x-1.9 » 5.x-1.x-dev
31.91 KB

You should limit your selection to showing the menu item to the authenticated user (or just hide it from anonymous). I'm attaching an example of what I would do.

Thank you.

P.S. This is a 5.x issue which I leave here for users who still are on 5.x, if you need to, open a new issue.

bchavez’s picture

Hi to all...

I installed the module, and try to configure the administration menu to let a role permission.

I configure the administration menu block in the right side, then a edit the menu and in the item edit page, I go down and find the option:


then I select:

Hide menu item from selected roles the role that I don't want to see the option, then when I click on save give me the following error:

user warning: Duplicate entry '559-1-menu item access' for key 'PRIMARY' query: INSERT INTO menu_item_access_role (mlid, rid, realm, grant_view, grant_update, grant_delete) values (559, 1, 'menu item access', 1, 0, 0) in /home/granmallvirtual/public_html/sites/all/modules/menu_access/menu_item_access.module on line 1216.
user warning: Duplicate entry '559-2-menu item access' for key 'PRIMARY' query: INSERT INTO menu_item_access_role (mlid, rid, realm, grant_view, grant_update, grant_delete) values (559, 2, 'menu item access', 1, 1, 1) in /home/granmallvirtual/public_html/sites/all/modules/menu_access/menu_item_access.module on line 1216.

And I can't correct, I ran cron, update, and dbmaintenance and I can't correct the error, do you have any idea?

Bruno Chávez

bchavez’s picture

Solved, this module can't work with menu item access...

plan9’s picture

I did finally manage to get this to work - but I had to also restrict the user access to the specific modules which were generating menu items: such as 'FAQ' and 'Invite' and 'Contact' modules. It seems that 'menu per role' cannot control many module related menu items.

Grimreaper’s picture

Issue summary: View changes
Status: Active » Closed (outdated)


Closing as the issue is about a deprecated version of Drupal.