#3039 closed defect (bug) (fixed)
Leave group / Cancel Friendship buttons
Reported by: | gwu123 | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | normal |
Severity: | Version: | ||
Component: | Templates | Keywords: | reporter-feedback |
Cc: |
Description
Since the 1.2.7 update I see that the Leave group and Cancel friendship buttons do not show up in the user profile -> Groups and user profile-> Friends respectively.
However, say user1 visits profile->Groups of user2, user1 can see the Join/Leave group button.
Change History (5)
#2
@
14 years ago
I can confirm this bug in the bp 1.2.7. The cancel friendship button will not appear in profile->friends.
The problem is with bp_get_add_friend_button() code in bp-friends-template-tags.php.
You need to set the block_self=false for is_friend case
case 'is_friend' : $button = array( 'id' => 'is_friend', 'component' => 'friends', 'must_be_logged_in' => true, 'block_self' => false,//this is set true which causes the problem 'wrapper_class' => 'friendship-button is_friend', 'wrapper_id' => 'friendship-button-' . $potential_friend_id, 'link_class' => '', 'link_href' => wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/remove-friend/' . $potential_friend_id . '/', 'friends_remove_friend' ), 'link_text' => __( 'Cancel Friendship', 'buddypress' ), 'link_title' => __( 'Cancel Friendship', 'buddypress' ), 'link_id' => 'friend-' . $potential_friend_id, 'link_rel' => 'remove', 'link_class' => 'remove' ); break;
But I can't find the same issue with Groups.
The buttons weren't touched between 1.2.6-1.2.7. We don't know what theme you have. Did it work on BuddyPress 1.2.6 okay, or did you go from 1.2.5 to 1.2.7?