#3681 closed Defect (fixed)
Name collisions when registering to different sections of a menu
| Reported by: | ewinslow | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | Elgg 1.8.1b |
| Component: | Core | Version: | 1.8 |
| Severity: | minor | Keywords: | |
| Cc: | brett@… | Difficulty: |
Description
If I register two menu items with the same name to different sections, they will both appear as options.
E.g. I was trying to override the "profile" menu item to switch it to the "alt" section, so I just registered the menu item with the name "profile", but that didn't work, it just showed up twice.
Current solution is just to manually unregister the previous menu item before re-registering the new one.
Change History (6)
comment:1 Changed 23 months ago by cash
comment:2 Changed 21 months ago by brettp
This might not be the case any more because of changes to the menu system. Will need to check if it's still exists.
comment:3 Changed 21 months ago by cash
- Milestone changed from Needs Review to Elgg 1.8.1b
- Priority changed from normal to high
- Version changed from 1.8 Beta to 1.8
The changes to the menu system fixed this but broke using the same name in different sections. Looks like the name is now being treated as being unique. For example, the admin area has a "utilities" section for both the Administer and Develop areas. Now, you can only see one of those depending on what plugins are active (and probably the order).
comment:4 Changed 21 months ago by ewinslow
I think the names need to be unique to a menu. Let's call those adminutils and devutils or something.
comment:5 Changed 21 months ago by Cash Costello
- Resolution set to fixed
- Status changed from new to closed
Fixes #3681 fixed Utilities menu collisions in admin section and added documentation about registering more than one menu item with the same name to a menu
Changeset: 710b17aa37dd5c90db695219defdfef7a889f29a
comment:6 Changed 19 months ago by Cash Costello
Fixes #3681 fixed Utilities menu collisions in admin section and added documentation about registering more than one menu item with the same name to a menu
Changeset: 710b17aa37dd5c90db695219defdfef7a889f29a

Here is the current state of things:
Some of this wasn't explicitly designed.
Solutions to your report: