When using a user_reference field as a relationship in a view (or in the discovered case, as a relationship on a relationship), the column name used by the views query is incorrect.

That is because it looks for "uid" as the column name instead of, e.g, "field_friend_uid".

I've attached my user_reference.module which is fixed, but the change is fairly simple.

Line 869 (old) : 'field' => 'uid',
Line 869 (new): 'field' => $field['field_name'] . '_uid',

Verified working in a live situation, but not tested beyond that.

CommentFileSizeAuthor
user_reference.module.txt30.29 KBrichthegeek

Comments

richthegeek’s picture

Status: Needs review » Closed (duplicate)

Duplicate of the following issue which has patch available / to be committed: http://drupal.org/node/1275096