Members can not accept friend requests in BuddyPress

Members are not able to accept friend requests in BuddyPress, it's showing:
"There was a problem accepting that request. Please try again."
While trying to accept friend request. Can you please help what's causing this issue?

  • Adam Czajczyk
    • Support Gorilla

    Hello Michael

    I hope you're well today!

    I checked your site and I think that's most likely related to very strict security on site. There's no errors in browser console and in debug.log and error logs on server upon "Accept" attempts so that suggests that the request is most likely "blocked" on a server level.

    I'd suspect BulletProof Security as I can tell from the experience that the rules imposed by this plugin often lead to some unexpected issues. I'm not saying that the plugin is bad but just that it adds tons of "tweaks" and is very complex in setup and that sometimes has unexpected influence on other plugins.

    However, since it's a live site I didn't make any changes to the configuration and I didn't want to take any unnecessary risk. I would then like to ask you if you could (or if you allow me to do this) run a small test that would, hopefully, confirm or rule out that assumption.

    Would you please try this:

    1. access your site via FTP or cPanel (and its "File Manager")
    2. make a backup copy of your sites current .htaccess file
    3. put only these rules into .htaccess (but no other additional rules)

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    4. Save the file and clear all possible caches - on site and server (if there are any) and in browser
    5. Login as test user and see if you can now accept friends requrests

    If that works, it will confirm that it's because of some BulletProof Security rules (most likely related to "bypass" set of rules) and we'll need to find a way to adjust them. If it still doesn't work, we'll be able to rule that part out and I'll investigate it further.

    After the test, just restore the .htaccess from the copy that you made.

    Could you please give it a go and let me know about results?

    Best regards,

  • Predrag Dubajic
    • Support

    Hi Michael,

    Apologies for the delay here, we work on tickets from oldest response to newest and your responses pushed it further down the queue each time.

    I had a closer look at your installation now and I'm afraid that it's completely unclear what is causing this and based on your current site look I would suggest creating a staging site and doing some cleanup there in order to try and determine the issue.

    First thing that you should do, and the easiest step, is to check for any conflicts.
    You can do that by disabling all of your plugins except for BuddyPress and switch to default WP theme to see if it works after that.

    If that doesn't help then some further cleanup, like I mentioned above might be needed.
    I'm saying this because in addition to a lot of rules in your .htaccess file there are also some additional defines in your wp-config.php.
    In addition to that you also have addtional .htaccess files in other folders and some leftover folders from old plugins like W3TC and some other non-WP folders, especially inside wp-content folder.

    So my suggestion here, if the conflict test doesn't work, is to clear up all of that non-standard defines and files/folders that you have on your site and then give it another test after that.

    Since this can affect your installation I strongly suggest doing these tests on a staging site as I mentioned at the start of my message.

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.