Hi,

I am having a bit of a problem with one of the modules I wrote.
In my views, I link to the user id like this:

'requester_id' => array(
'title' => t('Requesting user'),
'help' => t('The user who made the request'),
'relationship' => array(
'base' => 'users',
'field' => 'uid',
'handler' => 'views_handler_relationship',
'label' => t('Requester'),
),
),

Which is great.
Users click in "Relationships" and add the relationships they they want.

Now, creating a view of type "block"...
If the user goes to Arguments, and picks "User ID" (one of the relations), and then pick "Action to take if argument is not present: " -> Provide default argument, in the "Default argument type: ", the option "User ID from URL" is not there.

I am not sure this is enough information for you... if not, please let me know. Users would like to create blocks which target a specific user while visiting their user page, and at the moment they can't.

Bye,

Merc.

Comments

mariusooms’s picture

Hi...I think I found the issue at hand, looking at Node ID from URL as an example, I noticed the User ID from URL path was missing the folder name.

So in views/modules/user.views.inc on line 300 change:

'path' => drupal_get_path('module', 'views') . '/modules',

to

'path' => drupal_get_path('module', 'views') . '/modules/user',

I think moving this function to .inc the path got mis-configured. Could that be right? In any case User ID from URL shows up now, but I have not tested its functionality, but trust it will work. I hope this helps as I do try to contribute when I can ;-)

Regards,

Marius

PS. Sorry I do not know how to create patches. I'll leave that to the real programmers :)

merlinofchaos’s picture

Status: Active » Fixed

You're absolutely right, mariusooms. Good catch. Fixed in CVS. Thanks!

mercmobily’s picture

Hi,

I just want to thank Marius for the amazing work he did and is doing with FriendList and now Views.
And Merlin, obviously, for being such a wizard.

Merc.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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