Bug #4288

Add Friend -1

Added by Samantha Raddatz about 6 years ago. Updated about 6 years ago.

Priority name:
Category name:
BuddyPress (misc)
Target version:
Start date:
Due date:
% Done:


Estimated time:


After clicking 'Add Friend' on the directory page (, a '-1' appears where the button was before (see red circle in attached screenshot). Instead, this should say 'Request sent' (see mockup attached).

-1mockup.png (160 KB) -1mockup.png Samantha Raddatz, 2015-07-10 02:45 PM
-1screenshot.png (158 KB) -1screenshot.png Samantha Raddatz, 2015-07-10 02:45 PM


#1 Updated by Boone Gorges about 6 years ago

  • Status changed from New to Resolved
  • Target version set to 1.8.5

This is a really odd issue. It's caused by a weird combination of factors: a BuddyPress upgrade from a few months ago, along with the fact that we don't use BP_User_Query for our Members directory. This was causing BP to think, incorrectly, that the logged-in user was not friends with anyone in the Members directory, making it show the Add Friend button even though a friendship already existed. As such, there was a nonce mismatch when the friendship request was sent upon clicking the button.

I'm pretty sure that this points to a bug in `friends_check_friendship_status()` - it's not accounting for users of the legacy user query - but I'll let Ray decide whether (a) that's the case, and (b) it's worth fixing in BP.

For CAC, I've put a super weird workaround in place which will restore buttons to their proper behavior.

Also available in: Atom PDF