After upgrading to Views 6.x-3.x-dev from Alpha-3, I am now receiving this error:

User warning: Unknown column 'user_relationships.uid' in 'on clause' query: db_query_range /* admin : db_query_range */
SELECT DISTINCT(users.uid) AS uid,
users_user_relationships_profile_values_profile_picture.value AS users_user_relationships_profile_values_profile_picture_valu, users_user_relationships.uid AS users_user_relationships_uid,
users_user_relationships_profile_values_profile_last_name.value AS users_user_relationships_profile_values_profile_last_name_va,
users_user_relationships_profile_values_profile_first_name.value AS users_user_relationships_profile_values_profile_first_name_v,
users_user_relationships_profile_values_profile_first_name.uid AS users_user_relationships_profile_values_profile_first_name_u,
user_relationships.requestee_id AS user_relationships_requestee_id,
user_relationships.requester_id AS user_relationships_requester_id,
user_relationships.rid AS user_relationships_rid,
user_relationships.approved AS user_relationships_approved
FROM users users
LEFT JOIN user_relationships user_relationships ON users.uid = user_relationships.requestee_id
LEFT JOIN users users_user_relationships ON user_relationships.uid = users_user_relationships.uid
LEFT JOIN profile_values users_user_relationships_profile_values_profile_picture ON users_user_relationships.uid = users_user_relationships_profile_values_profile_picture.uid AND users_user_relationships_profile_values_profile_picture.fid = '12'
LEFT JOIN profile_values users_user_relationships_profile_values_profile_last_name ON users_user_relationships.uid = users_user_relationships_profile_values_profile_last_name.uid AND users_user_relationships_profile_values_profile_last_name.fid = '2'
LEFT JOIN profile_values users_user_relationships_profile_values_profile_first_name ON users_user_relationships.uid = users_user_relationships_profile_values_profile_first_name.uid AND users_user_relationships_profile_values_profile_first_name.fid = '1'
WHERE (user_relationships.requestee_id = 1) AND (user_relationships.approved = '0') LIMIT 0, 10 in _db_query() (line 147 of C:\wamp\www\austin\includes\database.mysqli.inc).

I believe it's this line: "users_user_relationships.uid AS users_user_relationships_uid" that is throwing the error. The UID column in the User Relationships table never existed, so I believe it's Views that is now querying incorrectly. The views that are affected by this are the ones that include the relationship "User relationships: Requester user" or "User relationships: Requestee user".

This error forces the view show the empty text.

All help greatly appreciated, since this affects multiple views in the website.

P.S., this error also occurs on Alpha-4

CommentFileSizeAuthor
error.JPG202.99 KBkevstav13

Comments

kevstav13’s picture

merlinofchaos’s picture

Status: Active » Closed (won't fix)

This may be an issue with the user_relationships module, since this seems to affect only user relationships fields. It's possible that something is not configured correctly in ur's hook_views_data.

LEFT JOIN users users_user_relationships ON user_relationships.uid = users_user_relationships.uid

This relationship is clearly wrong, and 99.9% likely to be a failure in the user relationships module. You should post your request there.

kevstav13’s picture

I didn't update the user relationships module, and it was working fine until updating views to the dev version from alpha3. That's why I was thinking it was a views issue, but I'll post this to the UR issues and see what they can do. Thanks!

Ghostthinker’s picture

Ghostthinker’s picture

Issue summary: View changes

Clarified how it affects the view