Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 11 years ago

Last modified 6 years ago

#3039 closed defect (bug) (fixed)

Leave group / Cancel Friendship buttons

Reported by: gwu123's profile 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)

#1 @DJPaul
11 years ago

  • Component changed from Core to Theme
  • Keywords reporter-feedback added

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?

#2 @sbrajesh
11 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.

Last edited 11 years ago by sbrajesh (previous) (diff)

#3 @DJPaul
11 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Ah hah, thanks -- that particular fix already went into trunk in r3523

#4 @DJPaul
11 years ago

  • Milestone changed from Awaiting Review to 1.3

#5 @DJPaul
6 years ago

  • Component changed from Appearance - Template Parts to Templates
Note: See TracTickets for help on using tickets.