Download & Extend

Views argument User:ID and me aliases

Project:me aliases
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active

Issue Summary

Hello,

I am trying to figure out how to get the 2nd user's posting to show when a user is viewing another the second user's profile page.

I am currently using 'me' aliases. When I set the argument under view to

user ID > Default argument type: 'User ID from URL',

I do see the posting for the user I am viewing shows correctly. However, when I come back to my user profile, views seems to get confused by the url because the url shows as user/me instead of user/1

Can someone please let me know how to fix this? thank you =)

Comments

#1

Category:task» support request

There is an option under the 'me' alias settings page titled something like "Redirect to uid". You'll want to select that option. You may also wish to uncheck the "Rewrite links generated by the drupal menu system".

#2

Hi cdale,

I tried that solution and it solved my problem immediately!! Thanks so much!! and have a great day!!

BB

#3

Status:active» fixed

#4

Status:fixed» active

re-opening this issue as the me module breaks views argument handlers in my situation.

im also using 6.x-2.x-dev latest snapshot from today, and views 6.x-2.3. if you enable the me module, any views with an argument of User : UID break.

the argument handler in the view shows the following error - Error: handler for users > uid doesn't exist!

#5

Category:support request» bug report

#6

Ahhhh.. yes.. of course... I'll have to think about a way to cleanly fix that up. You are talking about views that were created before you installed the me module yes?

#7

Status:active» fixed

I've just committed the attached patch to fix this. Should be all sweet now.

AttachmentSize
me-405866.patch 2.05 KB

#8

Status:fixed» closed (fixed)

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

#9

Status:closed (fixed)» active

Was this patch never rolled into the release versions? I just installed me alias 6.x-2.8 and am having this same issue.

#10

The patch was committed http://drupalcode.org/project/me.git/commit/940d4e0
But later the implementation was changed to utilize the argumentation validation plugin of views (http://drupalcode.org/project/me.git/commit/1487d8a)

You can configure the validation plugin (Me) and select the checkbox "Redirect to the users uid when 'me' is entered as an argument.", that should redirect all requests for me to uid, is that what you want?

#11

I did attempt that in trying to get it all working with no success. Despite clearing caches and other tricks, the "redirect to the users UID..." never worked properly. (i.e. it continued to display the 'me alias' URL).

#12

Go to http://d6.codeit.in

User credentials
username: demo
password: demo

admin credentials
username: admin
password: lapurd

Sign in as "demo" and go to http://d6.codeit.in/user/me/my_content , you will be redirected to http://d6.codeit.in/user/3/my_content

Sign in as "admin" and checkout the view http://d6.codeit.in/admin/build/views/edit/user_content

#13

Logging in as demo and going to http://d6.codeit.in/user/me/my_content does not redirect the visitor (at least according to the browser address bar).

However, from looking at the view, I see that adding a Me Alias validator to the User ID argument compensates for the missing integer in the URL.