Closed (duplicate)
Project:
User Relationships
Version:
6.x-1.0-rc3
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
20 Jan 2010 at 15:24 UTC
Updated:
12 Feb 2025 at 18:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedscreenshot of above mentioned issue.
Comment #2
Anonymous (not verified) commentedAfter further testing I can confirm that the error is in fact being caused by enabling the User relationships: Status field in my View.
Comment #3
design.er commentedYes, I can confirm this. I have the same issue.
Comment #4
alex.k commentedSounds like a duplicate of #587880: Change status link for Views which is already fixed in -dev.
Comment #5
Anonymous (not verified) commentedCan you please confirm if the patch you are referring to here http://drupal.org/node/587880#comment-2144504 can be applied to version 6.x-1.0-rc3?
Thanks
Comment #6
alex.k commentedYes it should work with no issues.
Comment #7
bentoo42 commentedI want to be able to have an add or remove link depending on whether a particular relationship has been added. What is the best way to accomplish this? Do I need to write custom php code to check if the relationship exists using the UR-api?
Comment #8
alex.k commentedIf you need to show link to add/remove relationship of type B based on the existence of relationship of type A - then you'll still need custom PHP code. Otherwise the field will know the status of relationship and show correct add or remove link.
Comment #9
andrew.lansdowne commentedActually it seems that the views field is not able to show an Add link - it only shows Remove, Cancel pending, Approve, Decline. Which is a shame if you wanted to make a 'friend finder' view but I suppose it makes sense since fields and filters run on data which *does* exist rather than not.
You can do this via custom PHP field (using the Views Custom Field module; you must add a field User: UID before the PHP field - it can be hidden from display) for example:
Hope that might help someone. It could do with more stuff for handling pending, approve, reject, cancel though. Will update if I find a better way... hope someone else might too :-)
Comment #10
andrew.lansdowne commentedUpdate: This appears to be a better way which uses the same functions that the user relationships user view page uses to write out links:
I haven't tested this in all circumstances yet but it looks good so far.
Comment #11
salientknight commentedAre you adding this to a custom PHP field?