Hello
I have wordpress 6.1.1 and buddypress 14.0.0.
Just got the news that people have been trying to jpin the website but they aren’t gettiong the buddypress activation emaiuls.
Please advise. Thank you.
I am refering to this post here:
Suppressing rich text on xprofile text area
Unfortunatelay using this code which was posted by danp throws an error when saving data to the field.
Warning: Attempt to read property “id” on null in …/plugins/buddypress/bp-xprofile/bp-xprofile-template.php on line 558 Cannot modify header information…
How to fix that?
At the moment I just set enabled true and inject that into the page I want but to do it into a field using the id might be a better solution.
I think Core should fix it first and then BuddyPress would inherit the update. Unlikely we will invest time into it since we plan to move things into the block editor.
It sounds like your CDN might be caching the Ajax responses, leading to incorrect member activities on subsequent loads. You can try adjusting the cache settings for Ajax requests in CloudFront or configuring Buddypress to prevent caching of dynamic content. This tweak could help you “instaup” your site’s performance and ensure the correct data is always displayed.
@TheSupercargo I’m not sure if this is related to your problem and if you can test this pr.
I’m running PHP 8.2, have deactivated all plugins other than BuddyPress, have switched to a default WordPress theme (2023), and have tried BuddyPress 12.2 and 14.0 – and BuddyPress will not send out emails to new members at all.
This includes when they self-register, when admin sends them reminder emails manually, and when registration moderation is used and admin sends them an approval email.
The BuddyPress plug-in itself says that emails are successfully sent, but they do not arrive and (when active) the WP Mail Catcher plugin does not record them as having been sent successfully or having failed: it does not acknowledge them at all.
All other emails from my site work fine when other plugins are active – including 2FA, forgotten passwords and Newsletters. Can anyone suggest what the issue might be, or what next steps I should take to troubleshoot BuddyPress? Thanks.
Is there a URL or shortcode that can be used so a member can directly go to their “Subscriptions” page? We are using WP v6.6.1, BuddyPress v14.0.0, and MemberPress v1.11.34

I have made custom group members loop on a different URL than members/all-members, inside subpage for single group : https://v3upgrade.local/en/groupes/my-group/students/?mlpage=2
the template is exactly like in members-loop.php, but ajax did not work, and when checking the payload response the result is like so : `scope: all
extras: false
action: students_filter
object: students
filter:
target: #buddypress [data-bp-list]
search_terms: h
page: 1
caller:
template:
method: reset
ajaxload: true( when searching for an item ), for all-members page, the payload is :nonce: 6065e4290b
action: members_filter
object: members
scope: all
filter:
target: #buddypress [data-bp-list]
search_terms: hamza
page: 1
extras: false
caller:
template: group_members
method: reset
ajaxload: true`
can anyone gives any idea how to make exactly like the members-loop , I have 2 pages : students that display users withing the group having the student role, and teachers that display users withing the group having the teacher role, I want both of them to be loaded via ajax so I can preform operation using bp_ajax_querystring ?
Thanks
Hello,
I try for hours to create a function, which will display a small red dot on the nav-bars acitivity stream link, when someone posted something new. Since all users are logged in, it should be possible to work with metadata “last_activity_visit”.
Example screenshot: https://i.imgur.com/eeCvvkj.jpeg
What I tried:
Added below code to themes functions.php. Actually managed to display a red dot, when trying around with the code. But either the dot won’t be displayed at all, or it’s displayed always, even when the user visited the acitivity stream.
function track_activity_page_visit() {
if (bp_is_activity_component()) {
update_user_meta(get_current_user_id(), 'last_activity_visit', current_time('mysql'));
}
}
add_action('wp', 'track_activity_page_visit');
function has_new_activity_posts() {
$last_visit = get_user_meta(get_current_user_id(), 'last_activity_visit', true);
if (empty($last_visit)) {
return false;
}
$args = array(
'date_query' => array(
array(
'after' => $last_visit,
),
),
'max' => 1
);
$activities = bp_activity_get($args);
if (!empty($activities['activities'])) {
return true;
}
return false;
}
function add_red_dot_to_menu_buddypress_activity($items, $args) {
if (is_user_logged_in() && has_new_activity_posts()) {
foreach ($items as &$item) {
if (strpos($item->url, '/activity/') !== false) {
$item->title .= ' <span class="red-dot"></span>';
}
}
}
return $items;
}
add_filter('wp_nav_menu_objects', 'add_red_dot_to_menu_buddypress_activity', 10, 2);
Any clue? 🙂
Three things:
– I can’t replicate the issue you have.
– user_name is not a valid field, btw. It was deprecated.
Using the followwing payload, I actually get this in BuddyPress 14.0 since you are using + in the user_login, that’s not valid.
Request Payload.
curl -X POST "https://bp-demo.test/wp-json/buddypress/v1/signup/" \
-d "context=edit" \
-d "user_email=pratik@testmail.com" \
-d "user_login=testthe+request+" \
-d "password=\"']));L)Q542q8dL3" \
-d "signup_field_data[0][field_id]=1" \
-d "signup_field_data[0][value]=testthe+request+" \
-d "state=gggg" \
-d "country=AZE" \
-d "postal_code=444444" \
-d "mobile_phone=555555555"
{
"code": "bp_rest_signup_validation_failed",
"data": {
"status": 500
},
"message": "Usernames can contain only letters, numbers, ., -, and @"
}
Here is the BP configuration I have locally, taken from my local site: https://bp-demo.test/wp-admin/site-health.php?tab=debug
version: 14.0.0
active_components: Extended Profiles, Settings, Friend Connections, Private Messages, Activity Streams, Notifications, User Groups, Site Directory, Members, Members Invitations
url_parser: BP Rewrites API
global_community_visibility: anyone
template_pack: BuddyPress Nouveau 14.0.0
! hide-loggedout-adminbar: Yes
! bp-disable-account-deletion: Yes
! bp-disable-avatar-uploads: Yes
! bp-disable-cover-image-uploads: Yes
bp-enable-members-invitations: No
bp-enable-membership-requests: No
! bp-disable-profile-sync: Yes
! bp_restrict_group_creation: Yes
! bp-disable-group-avatar-uploads: Yes
! bp-disable-group-cover-image-uploads: Yes
! bp-disable-group-activity-deletions: Yes
! bp-disable-blogforum-comments: No
_bp_enable_heartbeat_refresh: Yes
Hi there,
I’ve customized the members looping template to display users’ full name by combining their first and last names. However, the current BuddyPress filters only support sorting members alphabetically by their display name. Could you please advise on how to modify the BuddyPress filter code to sort members by their first name or last name instead?
Thank you in advance!
This was fixed and will be released as part of BuddyPress 14.1. https://buddypress.trac.wordpress.org/milestone/14.1.0
This is how i did it, and it works as i tested it for my site.
Go to your files:
public_html/wp-content/plugins/buddypress/bp-templates/bp-nouveau/includes
wp-content > plugins > buddypress > bp-templates > bp-nouveau > includes
edit functions.php, go to line 983, or
keyboard find and search for “Registering for this site is easy. Just fill in the fields below, and we’ll get a new account set up for you in no time.”
edit and click save
After checking, I found that the endpoint did not verify user rights at all, and in fact, it did not handle the user_id mentioned in the handbook at all for creating activities.
As a patch, I asked AI to help me generate a plug-in. Anyone who needs it can directly store the following code as a PHP and upload it to the plugins:
Allow administrators to create dynamics for other users through API:
<?php
/**
* Plugin Name: Admin API activity creates privilege
* Description: Allows administrators to create activities on behalf of other users.
* Version: 1.0.4
* Author: Google Gemini Pro
*/
//Allow administrators to create activities on behalf of other users
add_filter( 'bp_rest_activity_create_item_permissions_check', function( $retval, $request ) {
if ( current_user_can( 'manage_options' ) ) {
$retval = true;
}
return $retval;
}, 10, 2 );
//Properly handle the user_id parameter when creating an activity
add_filter( 'bp_activity_before_save', function( $activity_data ) {
//Get request body content
$body = file_get_contents('php://input');
//Parse JSON data
$data = json_decode( $body, true );
//Check whether the user_id parameter exists
if ( isset( $data['user_id'] ) && get_userdata( $data['user_id'] ) ) {
//Modify the user_id property of the $activity_data object
$activity_data->user_id = $data['user_id'];
}
return $activity_data;
} );
Allow administrators to obtain other users ‘XProfiles through API:
<?php
/**
* Plugin Name: BuddyPress Admin API read XProfile privilege
* Description: Allows administrators to read any user's XProfile data regardless of field visibility settings.
* Version: 1.0.0
* Author: Google Gemini Pro
*/
//Allow administrators to read all XProfile data
add_filter( 'bp_rest_xprofile_data_get_item_permissions_check', function( $retval, $request ) {
if ( current_user_can( 'manage_options' ) ) {
//Check whether the field exists
$field = xprofile_get_field( $request->get_param( 'field_id' ) );
if ( $field ) {
//Check whether the user exists
$user = get_userdata( $request->get_param( 'user_id' ) );
if ( $user ) {
$retval = true;
} else {
$retval = new WP_Error(
'bp_rest_member_invalid_id',
__( 'Invalid member ID.', 'buddypress' ),
array( 'status' => 404 )
);
}
} else {
$retval = new WP_Error(
'bp_rest_invalid_id',
__( 'Invalid field ID.', 'buddypress' ),
array( 'status' => 404 )
);
}
}
return $retval;
}, 10, 2 );
I am pretty sure this is a bug, or the API handbook has not been maintained for many years. In the long run, maybe someone should fix these issues in the core program rather than using the temporary plugins I provide.
I’m trying to get the XProfile of the specified user using the API.
My endpoint looks like this:
https://xxxxxxxx/wp-json/buddypress/v1/xprofile/2/data/4
As expected, it will get Fields #2 with user ID 4, which has enforced visibility and visibility level onlyme (adminsonly in the database).
But when I used an authentication with admin privileges to get the endpoint, it returned “Sorry, the profile field value is not viewable for this user.”
After testing,”All Members” is also invalid, only in “Everyone” API can get data properly
The Buddypress version I am using is 14.0
@martenw
Hi there, would you like to open a bug report in trac for this?
https://buddypress.trac.wordpress.org/
I created the CDN for the website wechat.nz:
https://d6476bsmtk1fy.cloudfront.net/
The activities of the member page are correct when loaded for the first time, but the activities loaded after the second time are not the activities of this user.
https://d6476bsmtk1fy.cloudfront.net/members/JuneLee/
The mate of Youzify said that it seems that there is a problem when loading the Ajax of the anti-proxy Buddypress.
Does anybody have any technical suggestions about this?
Thanks.
Best regards
@emaralive @vapvarun thank you for the information, I can try editing and looking into other solutions when I get a chance but this one seems like a warranted challenge for the BuddyPress Programming team.
@thinlizzie it might be a waste of time at this point until the code is revised to take into account other CONSTANTS and the issue with high resolution avatars, cover photos and group profile photos getting discarded after upload. On one hand, that is nice to save server resources, but on the other hand, it’s frustrating because the images look lousy. It cheapens the look of BuddyPress to be honest.
The BuddyPress also needs more design customization options especially the social feed, it’s convenient to have it generate the “Social Feed” page automatically but that is causing me trouble. I’d love to be able to put that Social Feed as a WordPress Widget or in a shortcode to embed on any page template I want. This way, I can customize the background, add a custom title or whatever else I want. BuddyPress has a lot of Widgets available but I want the Social Feed as well with customization options.
@vapvarun I’m not recognizing any of the filters containing resize_args from the posted code snippet, do they ring a bell with you? Also, I think there is some misunderstanding about Avatars and Cover Images, i.e., the process thereof. I’m also thinking instead of all this coding requirement for end users, maybe a configuration screen would help facilitate the setting of the various parameters.
Furthermore, we (BP Team) should revisit this process because it is not possible to regenerate the Avatars or Cover Images because, I believe, the original images are deleted. Thoughts?
@whyknott There are no CONSTANTS specific to Group Avatars; meaning an Avatar is an Avatar, regardless if it is used as a User Avatar or a Group Avatar, they just reside in different directories/folders. Additionally, there are 11 CONSTANTS that are associated with Avatar (if my count is accurate), you may find them in a list, along with other BP related CONSTANTS at the following URL:
BuddyPress Constants
As to setting the “quality” level for when a resize is triggered, I’ll have to get back to you after I confirm that the filter you should be using for resize ‘quality’, does what it should. However, I need to build a tool to grab the resized image before it gets deleted, so that I can verify the ‘quality” level.
To validate file type fields before saving to the database, ensure you are using the correct hook and validation logic. The xprofile_data_before_save hook is intended for profile data in BuddyPress, but your issue might be with the validation function itself. Verify that your validate_required_unshared_fields function is properly defined and hooked. Additionally, check that you are correctly accessing and validating the file type fields within this function. Ensure your function looks something like this:
php
Copy code
function validate_required_unshared_fields($field) {
// Add your validation logic here
if (/* validation fails */) {
// Handle validation failure
}
}
add_action(‘xprofile_data_before_save’, ‘validate_required_unshared_fields’);
Make sure to replace the placeholder comments with your actual validation logic.
Currently, there isn’t any updated documentation regarding Avatar’s. There is some outdated info/documentation which is missing some information and is inaccurate with other information. A goal of the BuddyPress Team (BP) is to make documentation available that is current and accurate. That stated this will be on my TODO list to release documentation regarding Avatars, although what I’m covering here would be considered a “developer” handbook chapter.
In the meantime, there are a number of CONSTANTS that define the size (Width x Height) of various aspects of an Avatar, some of which you already know. There are other parameters that specify the “quality” during a resize and/or cropping process and these processes utilize WordPress to accomplish these tasks.
For example the CONSTANT – BP_AVATAR_ORIGINAL_MAX_WIDTH – default set to 450 – triggers a resize of an uploaded image that exceeds the size defined by this CONSTANT at a “quality” level of 90 (default). In your case, the 610 x 610 image is resized to 450 x 450 at a “quality” level of 90. Assuming defaults for thumb (50) and full (150) the image (450 x 450 @ 90) is cropped based on the cropping boundary box to the sizes for thumb and full at a “quality” level of 82 (default). In this example, your 610 x 610 image has undergone 2 processes that has reduced the “quality” twice.
To mitigate the degradation process, you could set BP_AVATAR_ORIGINAL_MAX_WIDTH equal to or greater than 610. The point being this would be the max width size before triggering a resize. This now leaves the cropping process at a “quality” level of 82, of which, you could mitigate by setting the JPEG “quality” level to something greater than 82 (max would be 100), assuming that you are uploading a jpg/jpeg image. This is defined at the following URL:
jpeg_quality
I’ll assume you know how to create a filter with a callback to return the desired “quality” level. Whether what I’ve outlined will satisfy your requirements for not being “horribly blurry” is yet to be determined because there may be another reason for “horribly blurry” and this just represents another “process of elimination” step/stage.
What I mean is, I’m uploading a perfectly crisp image that is 610×610 pixels in size and BuddyPress optimizes it and/or scales it down to fit the predefined image size, which is fine, however, in the process makes it look bad/blurry. I want the profile images to look better. Plain and simple.
I don’t want the images to be 610×610 because they are profile images but at the same time I don’t want them looking low res. I think if BuddyPress is setting them as ‘thumbnail’ size then it’s using WordPress built-in optimized image which those are typically horribly blurry.