This is likely a bug within the "Menu Admin per Menu" module and/or the "Administration Menu" module, but I'm hoping someone could provide some insight it on what may be going on.

Full details on the bug are available here, with screen shots:
http://drupal.org/node/1971912

I am posting this support request here since it seems that the problem only exists when I create a menu via Features. Thank you so much for any suggestions you may have.

Comments

justanothermark’s picture

Version: 7.x-1.0 » 7.x-2.x-dev
Component: Miscellaneous » Code
Category: Support request » Bug report
Priority: Minor » Normal
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.35 KB

When the menu module saves a new menu it calls menu_link_save() as well as menu_save() to create a menu link to manage that menu (at admin/structure/menu/manage/[menu-name]).

In menu_custom_features_rebuild() Features only calls menu_save() which means that, in certain circumstances, the menu link to manage that menu doesn't exist. To recreate the bug as reported I was using the menu_admin_per_menu module and a user that had permission to edit a menu but not all menus would only see a manage link for non Features menus.

The attached patch uses code from menu_edit_menu_submit() in menu_custom_features_rebuild() so that the menu link is created or updated.

klokie’s picture

@justanothermark - thanks for the patch. Could you please explain what should be done after patching in order to create the missing menu links?

justanothermark’s picture

@klokie I haven't got a suitable site to test on to hand but I believe it's just a case of reverting the menu component(s) of the feature. There's nothing new to export to a feature as it just creates the link for the menu itself. If Features thinks there's nothing to revert then you might need to do it through drush with the --force option http://www.drushcommands.com/drush-6x/features/features-revert or find some other way to make Features think it needs reverting.

klokie’s picture

Ok thanks. Turns out the bug I was seeing was related to another module. Someone else want to test #1?

ladybug_3777’s picture

I abandoned trying to use the "Menu Admin per Menu" module and somehow never came back to see the progress on this post. I'm now working on a new site where we really would like to use the type of access that "Menu Admin per Menu" provides so I'll be giving your patch a test today! I'll let you know if things have changed (even though it's a few years later!)

ladybug_3777’s picture

This patch seems to work for me! I'll have to run some more tests to make sure nothing else is adversely effected, but so far so good!

IMPORTANT NOTE!!!! As stated by @justanothermark this patch will only work after you perform a feature revert on your menus. What I did for this was I simply edited the description field of the menu's that were featured so that the feature would show them as overridden. This gave me the chance to revert back to the original description provided by the feature.

ladybug_3777’s picture

Has anyone else found this patch useful? It worked well for me but no one else has seemed to express a need for it :-(

joelstein’s picture

Status: Needs review » Closed (duplicate)
Related issues: +#1971912: Direct links to menus don't appear in Admin Menu

It has nothing to do with Features, and is solved by a patch in this Menu Admin per Menu issue:

#1971912-9: Direct links to menus don't appear in Admin Menu