Closed (duplicate)
Project:
Features
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Apr 2013 at 16:18 UTC
Updated:
29 Feb 2016 at 16:21 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
justanothermark commentedWhen 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.
Comment #2
klokie commented@justanothermark - thanks for the patch. Could you please explain what should be done after patching in order to create the missing menu links?
Comment #3
justanothermark commented@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.
Comment #4
klokie commentedOk thanks. Turns out the bug I was seeing was related to another module. Someone else want to test #1?
Comment #5
ladybug_3777 commentedI 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!)
Comment #6
ladybug_3777 commentedThis 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.
Comment #7
ladybug_3777 commentedHas anyone else found this patch useful? It worked well for me but no one else has seemed to express a need for it :-(
Comment #8
joelstein commentedIt 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