Download & Extend

Incorect mid (0) when creating new menu or submenu with permission

Project:Menu Subtree Permissions
Version:5.x-0.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

This is very usefull module and I strongly need it but I encountered one issue:
When one adds new menu or submenu (for example under Navigation Menu) with some of roles checked under "Menu Subtree Permissions", the insertion into table "menu_stp_roles" for that roles comes with mid 0 not with mid of creating submenu.
The result for user is to see every menu in the system :(

The workaround is to firstly add (sub)menu without any roles checked and edit then edit again and add permissions for roles.

Regards

Michal

Comments

#1

Hmm, not yet sure about how to quickly fix this since the new menu only gets a 'mid' after it's been saved, but I'll look into this.
Quick fix is probably to only act on items that already have a mid - that way you'd have to edit the item again as you do now, but it would avoid mistakes.

nobody click here