In view, if you try to add a relationship to "User relationships: Requestee/Requester user" (bring in data about the user who start/accepted the relationship, or link to relationships that other users have established to this one) to get more information about the requester/requestee, you get this error

Column not found: 1054 Unknown column 'user_relationships.uid' in 'on clause'

Anyone else get this issue?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Ghostthinker’s picture

same here with views-7.x-3.x-dev

Ghostthinker’s picture

Ghostthinker’s picture

FileSize
1.33 KB

Try this patch. I think the current version of views needs that the "field" in a relationship has to be "base field", the field variable is for the current tables field name and can mostly be left out

Ghostthinker’s picture

Status: Active » Needs review
FileSize
1.16 KB

I hope this patch will be accepted, all those rules ...

vishun’s picture

This appears to resolve the issue on D6 as well.

Shawn DeArmond’s picture

Status: Needs review » Reviewed & tested by the community

Perfect! Thanks!

dgastudio’s picture

same error, same solution. thanks.

inky@inky3d.com’s picture

Thanks! Have been looking for a solution to this, as UR wasn't working with Views 6.x-3.x-dev.

This seems to have resolved it for me.

rollingnet’s picture

I confirm that the patch above is working on 7.x.1.x.dev.
I suggest to change the status in "patch (to be ported)", since without this patch, view's additional fields on reguestee or requester don't work at all.

bjalford’s picture

Confirm patch works as expected.

Ghostthinker’s picture

Priority: Normal » Critical
Status: Reviewed & tested by the community » Patch (to be ported)
sohailkhalid’s picture

I am still getting below error after apply patch
'Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column \'user_relationships.uid\' in \'on clause\''

in views_plugin_query_default->execute() (line 1386 of C:\software\vustudyaid\sites\all\modules\views\plugins\views_plugin_query_default.inc).
Debug:

'Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column \'user_relationships.uid\' in \'on clause\''

in views_plugin_query_default->execute() (line 1386 of C:\software\vustudyaid\sites\all\modules\views\plugins\views_plugin_query_default.inc).

any one can help on this?

nlisgo’s picture

Had to manually apply the patch to the latest dev but it did the trick for me.

Berdir’s picture

Status: Patch (to be ported) » Reviewed & tested by the community
snooze191’s picture

#4: user_relationships-1312956-4.patch queued for re-testing.

Anonymous’s picture

works for me. see #13.

samhain’s picture

Version: 7.x-1.x-dev » 7.x-1.0-alpha3
FileSize
2.2 KB

Try this patch, it works for me

aacraig’s picture

This patch is not working for me on the latest dev. I still see the error message.

jpshayes’s picture

After uninstalling UR-views 7.x-1.x-dev and applying patch from #17 and reinstalling the error is gone for me.

broncomania’s picture

Version: 7.x-1.0-alpha3 » 6.x-1.1

#17 works also with D6 views 3 and UR 1.1

mrf’s picture

Version: 6.x-1.1 » 7.x-1.x-dev

Thanks for the update broncomania, but there is already a separate issue for this on D6 over at #1285636: Incompatibility with Views 3.x?. I'll post this patch over there based on your success.

Shawn DeArmond’s picture

#17 works great too.

Berdir’s picture

Status: Reviewed & tested by the community » Fixed

Commited (fixed the comments coding style while I was at it), finally. Sorry for the huge delay.

Status: Fixed » Closed (fixed)

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