Closed (fixed)
Project:
User Relationships
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
25 Sep 2009 at 13:54 UTC
Updated:
22 Sep 2011 at 23:42 UTC
Jump to comment: Most recent file
Comments
Comment #1
R.Hendel commentedThanks Karsten,
I tried it and found a mistake in it:
User initiating relationship gets links displayed to "approve" or "disapprove" - instead of this he should get the option to "cancel" his request.
Regards,
Ralf
Comment #2
kars-t commentedNew version now with "Accept | Decline", "Remove" and "Cancel" links in a view field in regards to the current loggend in user.
Comment #3
alex.k commentedThank you very much, will test it shortly.
One question... this check:
Is it better to check for the 'can have relationships' permission? That'll cover registered users who shouldn't be seeing the links as well.
Comment #4
kars-t commentedYes checking the access right is much better. Added to the patch.
Comment #5
DrakeRemory commentedThis is an even more correct version. v3 used to always show the cancel link when the logged in user was the requester. Now the correct remove link is shown if the relationship was approved.
Comment #6
Bilmar commentedHello,
I patched the newest version of UR module and the patch was successful.
However, I'm getting 'Error: handler for user_relationships > status_link doesn't exist!' when I add the status link field.
Does anyone know what the issue may be?
Thank you!
Comment #7
robby.smith commentedHowdy-
Is there a plan to commit this into main module?
Comment #8
alex.k commentedCommitted in http://drupal.org/cvs?commit=285604. Thanks!!
@trupal218 use the -dev release once it includes the commit. It should work with the declaration line included.
Comment #9
Bilmar commentedThank you very much!
Comment #10
robby.smith commentedI tested the newest Dev version which is resulting in the following error:
warning: Invalid argument supplied for foreach() in /home/example/public_html/drupal/sites/all/modules/user_relationships/user_relationships_api/user_relationships_api.module on line 43.
Also, I see that the remove status link in views is loading as ajax popup. Is there a way to choose not for it to be a popup but rather a page for confirming remove/cancel.
User Relationships 6.x-1.x-dev (2009-Nov-08)
Comment #11
kars-t commentedHi robby.smith.
Do you think the bug is related to this patch? If yes please set this issue to needs work.
And the second thing seems to me another feature request that maybe should get its own thread? As far as I remember there are globals settings for this and as this patch uses the default API the settings should be apply here as well. So maybe this is a bug report and not a feature request.
No offense but just please keep the issue queue as clear as possible. I was puzzeld by this status change. :)
Comment #12
robby.smith commentedahh yes, that would be a more appropriate status. The error began with an update to the newest Dev version of User Relationships, keeping everything else the same.
Regarding the way the status link behaves, I will open a new thread with a feature request.
Comment #13
Bilmar commentedHello,
I have tested this several times and also on a fresh install of Drupal and do not see the issue at #10. Anyone else?
Thank you for the great work!
Also, I don't see the feature request in the queue mentioned at @#12 yet and am interested in this feature so will add into the queue now.
Comment #14
robby.smith commentedI'm still not able to get this to work =(
I'm using Views Content Panes in a Panel and the url below shows for the status link 'remove' when users are friends in the view.
http://example.com/user/1/relationships/%2Fremove?destination=myfriendspage
I would appreciate any pointers.
Comment #15
design.er commentedI can confirm - I have the same broken 'remove' link in views: http://example.com/user/1/relationships/%2Fremove?destination=myfriendspage
Help is much appreciated. Thanks a lot for this great feature. :)
Comment #16
Bilmar commentedI have been doing updates and I now see the issue @ #15 and #14 above.
the remove link in views is pointing to url:
http://mysite.com/user/1/relationships/%2Fremove?destination=mysitesfrie...
Comment #17
rburgundy commentedMay I kindly ask if any updates on this issue? I did not post but experienced the same issue.
Comment #18
terbs commentedThe change status link (specifically 'remove') is pointing to an invalid URL. Can someone point me in the right direction to change it myself? This issue seems to have been happening for a while without any resolution. Where is this link being generated in the backend?
Comment #19
terbs commentedOkay, for anyone experiencing the issue with the remove links not updating, here's how to fix it.
File: /sites/all/modules/user_relationships/user_relationship_views/views_handler_field_user_relationships_status_link.inc
Line 51: Change $values->rid to $values->user_relationships_rid
You might have to do it on line 37 too.
Comment #20
rburgundy commentedIf you have time, can the fix be created as a patch?
I will try your explanation above in the mean time.
Thanks
Comment #21
kars-t commentedI unassign this from me for the moment. I looked at the code but think this would need further testing as I can't say if the one or the other variable name is always correct. Maybe we need an if clause?
Comment #22
alex.k commented@Kars-T, thanks for looking at this. Did the original code work for you all along? It must have as I do not recall seeing the error either. Does it depend on the view being of type Node, User, or User Relationship (all of which can be made to use this field)?
Comment #23
kars-t commentedI originally wrote this for one of our projects and did test this on our stage. I don't know how frequently this was used during the beta test of the site but at least there where no new bugs in our issue cue. So yes I believe it did work. :)
Comment #24
rburgundy commentedI get the same error with node view and user view types.
Comment #25
robby.smith commentedI am still experiencing the same issue mentioned above. May I ask if there has been any updates?
I'm really looking forward to the Status Link field working in views. Thanks for the great work!
Comment #26
alex.k commentedCould somebody attach an export of the view? I can't reproduce the issue.
Comment #27
alex.k commentedComment #28
rburgundy commentedPlease see views export and screengrab attached. I will be happy to provide any further info required.
Thanks for taking your time to look into this.
Comment #29
alex.k commentedCommitted a fix http://drupal.org/cvs?commit=309044, please try the -dev release (clear the views cache or run update.php). If the link worked for you before, please try it as well to make sure we did not break anything.
Comment #30
rburgundy commentedawesome! I will test it out as soon as the new dev release is available on the site.
Comment #31
rburgundy commentedI tested with the newest 6.x-1.x-dev version and the status link works great!
Thank you for looking into this issue and implementing a fix.
Comment #32
Bilmar commentedTested 6.x-1.x-dev (2010-Jan-04) and the status link url is working perfectly.
Thank you for the debugging and the quick fix.
Comment #34
oxford-dev commentedId rather reopen this issue than start another but there is a shortcoming with this feature.
If the view is displayed in an area retrieved via ajax then it breaks.
The reason I believe is due to the page redirect after the action, as it has come from an ajax region and not a page i think its getting confused. eg:
user/1/relationships/2/remove?destination=views%2Fajax%3Fview_name%3Duser_relationships_browser%26view_display_id%3Ddefault%26view_args%3D1
This results in a blank page with only javascript appearing after you have confirmed the 'remove'.
Im displaying this view inside quicktabs
Comment #35
mrf commentedOxford-dev looks like your issue is only partially related to this original (quicktabs is sort of an edge case for testing). Please open a new bug report if you are still experiencing problems.