Bug #6091
closedMenu deletion doesn't work with sub_menu
Description
Menu::Mapper.delete doesn't currently work for sub_menu items. I can remove items from :user_menu since that one doesn't use sub_menu, but when I try to remove menu items for nested entries in :top_menu in a plugin initializer, the menu item is not removed.
I have a fix which addresses this by modifying the .delete method. Instead of using find/delete on the top level node (which doesn't traverse children), the fix calls .each on the root node, which does traverse. I'm not sure if this fits with foreman coding/style guidelines, so if there's a better fix, feel free to replace my patch/PR with something different. This will need to be backported to 1.5-stable as well.
Proposed fix is at: https://github.com/theforeman/foreman/pull/1499
Updated by Dominic Cleal over 10 years ago
- Category set to Web Interface
- Status changed from New to Ready For Testing
- Assignee set to Scott Seago
- Target version set to 1.8.2
Updated by Dominic Cleal over 10 years ago
- Translation missing: en.field_release set to 16
Or 1.5.2, depending on schedule etc.
Updated by Dominic Cleal over 10 years ago
- Bugzilla link set to https://bugzilla.redhat.com/show_bug.cgi?id=1105566
Updated by Scott Seago over 10 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset cd3baa125283acf1d52daa2a51c8c2c1beb93397.