/tracker doesn't show the local task for /tracker/uid - but /tracker/uid does. This is proposed solution from pwolanin via irc. Not tested to see if it breaks something else yet.

Kind of defeats the object of local tasks with access callbacks depending on a uid, so marking as critical - same bug in 6 and 7.

Comments

pwolanin’s picture

I might put this line inside the if{} :

+  $map = $path_map;

thought I don't think it will actually have any logical effect.

pwolanin’s picture

chx says there might be a problem here - if a to_arg function needs the loaded object. I'm not sure the API for to_arg encompasses that?

Status: Needs review » Needs work

The last submitted patch failed testing.

lilou’s picture

Status: Needs work » Needs review
catch’s picture

Status: Needs review » Needs work

Needs a test, could probably just do it in the tracker tests.

catch’s picture

pwolanin’s picture

follow up to #2 - looking at the other function that calls _menu_link_map_translate():

http://api.drupal.org/api/function/_menu_link_translate/6

It's clear that we never expect $map to have the loaded objects when computing the to_arg values, only the path elements.

pwolanin’s picture

to re-phrase:

2 functions call _menu_link_map_translate()

the expressed concern recorded in #2 was that the proposed change to _menu_translate would mean that $map would not contain any loaded objects.

In fact, based on the code is _menu_link_translate, clearly the to_arg fucntion should not be expecting to have any loaded objects, and the change proposed here would actually increase the consistency of the code.

pwolanin’s picture

per talk w/ Dries, we can jsut do:

if ($to_arg) {
  _menu_link_map_translate($map, $router_item['to_arg_functions']);
}
$path_map = $map;
pwolanin’s picture

StatusFileSize
new740 bytes

Here's an additional assertion for the tracker test which demonstrates the bug.

pwolanin’s picture

Status: Needs work » Needs review
StatusFileSize
new1.87 KB

test + fix.

pwolanin’s picture

Assigned: Unassigned » pwolanin
StatusFileSize
new1.18 KB

patch for D6

dries’s picture

Assigned: pwolanin » Unassigned
Status: Needs review » Fixed

Thanks Peter. Looks good, tests pass so I committed it to DRUPAL-6 and CVS HEAD.

gábor hojtsy’s picture

Issue tags: -Needs backport to D6

Removing tag on backport.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.