I needed a block to display some information about users when their profile are shown.
I created a view with a block display, argument "user: uid" and provided a few fields to be shown.
As blocks cannot take arguments from the url, I set the "Action to take if argument is not present" to "Provide default argument" and "Default argument type" to "User ID from URL".
In pages user/1/* the block shows correctly but it's not filtering by the uid in the url as expected.
I found that the function get_argument() inside user.views.inc checks the menu router with menu_get_object using object types as 'user', 'user_uid_optional' and 'node', but not 'views_arg', which seems to be the right one (the loader function is 'views_arg_load').
Is this a bug or I'm wrong with my view setup?
Comments
Comment #1
merlinofchaos commentedOh right. Yes, this would be a bug. I've thought about this a couple of times but always when I'm away from the PC and unable to add it to my TODO list to fix, and then I forget about it later.
Comment #2
merlinofchaos commentedThis should be fixed in -dev now. Thanks!
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.