Issue with FRIENDS function in BuddyPress

When a user logs into our BuddyPress site they get access to a bunch of the BP features under the MyAccount menu. One of these is FRIENDS.

Here's my issue: when I log in using my test user and then click on FRIENDS the page that comes up -- below this header "My Friends » Recently Active" -- has this message:

Why not make friends with some of these members?

Presumably what would be displayed below that would be a random selection of members in the site. However, what we are seeing is a list where:

1. Each item is exactly the same: the currently logged in user.
2. The number of items in the list is the same as the number of users currently in the system (at this time there are five).

Here's the URL:
Log in = (jtest, jds)

In trying to run this down, it seems that when I click on FRIENDS the system is running this file: /themes/NameOfMyCustomTheme/friends/friends-loop.php.

That file is calling this function: bp_friends_random_members()

<h3><?php _e( 'Why not make friends with some of these members?', 'buddypress' ) ?></h3>
<?php bp_friends_random_members() ?>
<?php do_action( 'bp_after_random_members_list' ) ?>

I'm guessing that the problem is with this function, however, I'm not sure where in the code that function is located. And even if I could locate it, I'm not sure I have the skill to figure it out as I am not a PHP programmer.

Any suggestions would be welcome.

  • exberry
    • The Incredible Code Injector

    I also have Friends in the My Account. It also works.

    But Friends is a confusing nuisance in BP.

    How can I eliminate Friends in BP?

    Is it a leftover from my once installing the Friends plugin, which I have now removed?



  • swainjohn
    • WPMU DEV Initiate

    Hmmm. We're are WPMU v2.9.2 and BP v1.2.3

    I've been updating all along, but it's been a bit of a confusing experience.

    We have written and are using our own custom theme. We developed it several iterations of BP ago and have been trying to update it as we go along. Again, it's been a confusing experience.

    Also, we have disabled Blog Tracking and bbPress Forums. We are not allowing users to create blogs at this point. The main purpose of the site is to provide the other BP community features.

    I have uploaded here two screen shots as follows:

    1. dashboard.jpg - After the most recent BP upgrade we now have this yellow area at the top of the page saying to "activate a BuddyPress compatible theme." We already have our own custom theme working so have not done anything with this as we don't really understand what this is saying we don't want to mess up what's already working.

    2. folder.jpg - this shows all the folders in our theme.

    So ... what do you advise? Should I just disable the FRIENDS function? Is it not really being used now in the current BuddyPress?

    Please advise!

  • swainjohn
    • WPMU DEV Initiate


    I just realized the you were referring to a different directory than I responded to in my post a few minutes ago. ../plugins/buddypress/bp-themes/bp-default.

    There is no friends folder under /bp-default.

    However, under ../plugins/buddypress there is this folder:


    And there is a friends folder under our custom theme (clicking-online-bp) as shown in the image of that directory I posted above.

    I don't really understand how all these pieces interact. And perhaps we have some legacy stuff left over from earlier versions of BP.

    Any suggestions would be much appreciated.

  • exberry
    • The Incredible Code Injector

    I renamed the bp-friends.php file. No errors result.

    "Friends" is gone from the My Accounts list.

    However, "Friends" still appears in my Activity list. This must come from the database since I had tried a friend invite as a test.

    Now I am looking for how to remove the Friends record from the database.

    I am not sure if I can simply delete the Friends table in the database.



  • Richie_KS
    • HummingBird

    that's because you're using old structure code for bp 1.2 below...did you install the bp compatible plugin?
    since you're using old bp need to install the bp compatible plugins to make it work right.

    i think there should be disable friend component in wp-admin -> buddypress

  • swainjohn
    • WPMU DEV Initiate

    I have tried to migrate to the new BP code. In fact, I thought I had done so.

    What do I need to do to get onto the most current BP code structure? I do not want to be on the old code structure but I'm not sure what to do to migrate to the new one.

    Also, I am not sure what you mean by "did you install the bp compatible plugin?" What plugin are you referring to? Can you clarify?

    Lastly, is the Friends component no longer part of the current BP structure?


  • Aaron
    • CTO

    Friends is a part of BP. You can turn it on or off (along with all other components) on the Buddypress menu of your main blog (wp-admin/admin.php?page=bp-component-setup).

    Buddypress has been a nightmare to keep up with theme wise with the last few versions completely revamping the theme structure. The plugin he was referring to is, though if your theme is working you can ignore the message. I can't recall what you need to do in your theme to make the message not appear anymore. Look on

  • Aaron
    • CTO

    The function is part of bp core (wp-content\plugins\buddypress\bp-friends\bp-friends-templatetags.php).

    Can you first confirm that this issue exists in the bp-default theme with the compatibility plugin disabled? If so I would chalk it up to some BP vagary or bug with your current setup.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.