Hi,

I am not very sure, whether this can be categorized as a defect.
The function "_menu_get_active_trail_in_submenu()" in menu.inc uses a local static variable "$trails" to cache the active trail of the current path.
so When this function get's invoked the second time, it uses the stored array to find the active subtrail.

In my case, I have tried to use menu_set_location() to change the parent id of the current url (type: MENU_LOCAL_TASK - user/1/edit) to some custom parent menu.
The function menu_set_location() executes fine, changing the pid of current url menu item as desired.
However, when "_menu_get_active_trail_in_submenu()" is invoked for the second time, it uses the previous parent of current url because of the static variable.

My Temporary solution :
when i call menu_set_location() before phptemplate_page($content);, i get the desired effect.

Thanks

Comments

moshe weitzman’s picture

the static cache is getting a long review in D7. so, 2009 looks promising :)

dpearcefl’s picture

Status: Active » Closed (won't fix)

Considering the time elapsed between now and the last comment plus the fact that D5 is no longer supported, I am closing this ticket.