Closed (works as designed)
Project:
Drupal core
Version:
x.y.z
Component:
menu system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Feb 2005 at 21:49 UTC
Updated:
18 Jan 2006 at 07:10 UTC
This is a minor bug. The menu system requires a local task to have more than 1 child in order to create secondary local tasks. In other words if a local task only had 1 child, menu system would not create a secondary local task menu item.
This patch fixes that with the addition of 1 character in the code.
andre
| Comment | File | Size | Author |
|---|---|---|---|
| menu_inc_1a.patch | 826 bytes | andremolnar |
Comments
Comment #1
dries commentedI'm pretty sure this patch would break some pages. Some modules have a tab and a subtab that show the same page. The tracker page, for example, relies on the fact that the subtab does not get shown when there is only one subtab. However, when there are two or more subtabs, they are being visualized. I guess this needs some more thought.
Comment #2
andremolnar commentedhmmm... Well, I certainly don't think that this should be the expected behaviour of the menu system. A child menu item is a child menu item, and I would expect that it show up if I create that child in hook_menu. When patching user.module it took me over half an hour to track down this bug (a single missing character was easy to over look).
Nor do I personally think that the menu system should accomodate exceptions of the sort described in tracker.module. It should be the module's job to decide when to create a local task in hook_menu using logic local to the module.
IMHO if applying this 'breaks' modules - so be it. It would force a necissary code/logic improvement in those modules.
andre
Comment #3
dries commentedWell, the problem is that the tracker module can't determine whether to add the subtask. It should only be added when another module adds a second subtask. I'll explore this some more.
Comment #4
killes@www.drop.org commentedDries doesn't like it as is.
Comment #5
killes@www.drop.org commentedThere is a patch after all.
Comment #6
drumm-1
There are quite a few cases where the current behavior is desirable. Modules often add local tasks to pages which were not made by the module itself. This is helps the end UI to not resemble the underlying modular structure.
The current de-facto standard is that a local task's title should not be necessary to the page if it is the only local task by default and should provide distinction from potential additional local tasks.
What is the user.module problem which led to this issue?
Comment #7
moshe weitzman commented