[development] Hook_menu_alter doesn't work if menu item changed
prometheus6 at gmail.com
Mon Apr 27 18:10:10 UTC 2009
Curiosity (and recognizing I'm about to run into the same problem Nancy had)
made me look. Each of the menu item editing forms has an ['#item'] element
that gets the original menu item. So instead of a more sophisticated test in
_menu_navigation_links_rebuild(), maybe a more sophisticated test assigning
a value to $item['customized'] just prior to calling menu_link_save()
(though there's 17 occurrences of menu_link_save() in core...)?
On Mon, Apr 27, 2009 at 12:36 PM, Earl Miles <merlin at logrus.com> wrote:
> Chris Johnson wrote:
>> I have to agree with Nancy. Re-weighting a menu item does not qualify
>> as customized, IMO. Otherwise, I agree it works as designed.
> The thing is, the system can only tell that there's an entry in the table,
> not what part of the item has been modified. I ran into this in some
> completely unrelated piece of code, where I ended up storing weights
> separately so that moving an item up or down didn't constitute modifying it,
> and it is a lot of extra code just to do that.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the development