Been digging around a bit with this and at this point not sure if this is a Views bug or possibly some obscure setting i missed.

I have a view at user/%/library, it works great, it is set to be a menu tab, this also works great as i now have a tab on my user's My Account page. All is well.

But now i am trying to add this link to a dynamic user's links block using Drupal's menu system. But when i add user/%/library as Path i get:

The path 'user/%/library' is either invalid or you do not have access to it.

digging through a bit of code i can see that the entry for this in the menu_router table has no value for to_arg_functions and therefore when the menu module tries to verify the path, if fails since it needs to be able to replace the % placeholder.

just as a test, i through a:1:{i:1;s:9:"me_to_arg";} into the to_arg_functions field in the menu_router table, and sure enough it seems to work fine.

is this a bug? am i missing a setting somewhere? is there some other reason i shouldn't be able to add these as dynamic menu items?

Comments

liquidcms’s picture

ok, a bit more digging and i can see that the "me aliases" module is what is providing the me_to_arg callback - so it must have added the entries for the tabs that other modules have added like user/%/notifications, user/%contact, etc - but it just doesn't add it for views.. maybe they have a patch - but still.. not sure why views wouldn't add this??

merlinofchaos’s picture

Category: bug » feature
Status: Active » Closed (duplicate)

Views is using its own arg loader that can load the view and do testing against it. the _to_arg() function does not support arguments the way the _load() function does. I did finally figure out a way around this in Panels but that would need to be translated to Views.

This isn't a bug. =)

I would also be shocked if there isn't already an issue in the queue about this.

sammo’s picture