Project

General

Profile

Actions

Bug #6091

closed

Menu deletion doesn't work with sub_menu

Added by Scott Seago over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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

Actions #1

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
Actions #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.

Actions #3

Updated by Dominic Cleal over 10 years ago

  • Bugzilla link set to https://bugzilla.redhat.com/show_bug.cgi?id=1105566
Actions #4

Updated by Scott Seago over 10 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF