Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 11 years ago

#2306 closed defect (bug) (worksforme)

Add Friend Button on member directory wrong after having added friend

Reported by: phlux0r Owned by:
Milestone: 1.5 Priority: normal
Severity: Version:
Component: Core Keywords: add friend button
Cc:

Description

In BP svn rev. 2914 when I request friendship and the friend approves it, then go back to the member list, the Add Friend button is still showing "Add Friend". Clicking it returns -1/.

In bp-core-templatetags.php in function bp_member_add_friend_button there is a test:

if ( null === $members_template->member->is_friend )

the next statement is:
$friend_status = 'not_friends';

but that's not correct since the is_friend isn't set so the statement should read:
$friend_status = null;

This will force the bp_add_friend_button() function to check for the friendship and display the correct button.

HTH

Change History (2)

#1 @cnorris23
12 years ago

  • Milestone changed from Future Release to 1.3

I actually noticed this the other day too. I just now tried it with the latest trunk, and the problem is gone. There weren't any code changes that should have fixed this, at least from first glance, but now I can't replicate the problem.

However, $friend_status = 'not_friends'; is correct, because if you force bp_add_friend_button to check for friendship, it will ultimately run BP_Friends_Friendship::check_is_friend, which will still return 'not_friends'. So this was (possibly still is) a result of something else.

Since the release of 1.3 not too far in the future, and trunk is what will eventually become 1.3, we should shoot to have this fixed for 1.3.

#2 @boonebgorges
11 years ago

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

Can't reproduce this on rev 3517. Reopen if you've got steps to reproduce on trunk.

Note: See TracTickets for help on using tickets.