I want to display Content-Profile of a contact with views.

I can display User data, but if I add a Relation Content Profile, the view shows nothing.
This is the sql code of the view:

SELECT user_relationships.rid AS rid,
   users_user_relationships.picture AS users_user_relationships_picture,
   users_user_relationships.uid AS users_user_relationships_uid,
   users_user_relationships.name AS users_user_relationships_name
 FROM mypaed2user_relationships user_relationships 
 LEFT JOIN mypaed2users users_user_relationships ON user_relationships.requestee_id = users_user_relationships.uid
 LEFT JOIN mypaed2users users_user_relationships_1 ON user_relationships.requester_id = users_user_relationships_1.uid
 INNER JOIN mypaed2node node_users ON .uid = node_users.uid AND node_users.type = 'profile'
 WHERE (user_relationships.approved = '1') AND (user_relationships.requester_id = 3)

I don't know if I'm wrong or If there's a error in a module.

Comments

loze’s picture

Same thing happens to me too.
the error is in this part of the query :
...
node_users ON .uid = AND node_users
...

bob jk’s picture

Status: Active » Fixed

While changing the query its working for me, Thanks

alex.k’s picture

Status: Fixed » Active

It looks like a Views issue. Out of my realm a little, but, check that you are using the latest views and content_profile.

You should also try to start off with the user_relationships_content view - the key is it is a Node view, not a User or User Relationship view.

mrf’s picture

Category: support » bug

This looks like a bug. Moving it out of the support queue for later review.

mrf’s picture

Component: Code » Views
mrf’s picture

Status: Active » Closed (cannot reproduce)

I was able to add a content profile relationship to the built in UR view and display fields relating to it, this one appears to no longer be an issue.