WP 6.5.5
Buddypress 12.5.1
If I go to this page: https://snvt.nl/professioneel-vertaler-of-tolk-inhuren/
And I do a search.
Then I put for instance a first name and a second name of an existing member in the search area, it will give no results.
If I search for ‘Margriet’, I will get 1 result
If I search for ‘Hunter’, I will get 1 result too.
If I search for ‘Margriet Hunter’, I will get no results.
What can I do to make the search Margriet OR Hunter?
Thank you
Saludo
Rianne
Anybody able to come up with a solution for this?
The 8 year old solution of danpb in this post to remove the rich text editor throws errors:
https://buddypress.org/support/topic/suppressing-rich-text-on-xprofile-text-area/#post-247640
Can you dev guys fix this in your next update? Otherwise using this field opens the profile page for site crashers.
I need to limit the entry of characters in a multiline textarea at the user profile settings (frontend). There are several questions about this in this forum with no real solution. Most of them are several years old.
As far as I see is buddypress using the tinyMCe editor together with this field.
On the tinyMCe blog they provide a solution to “How to limit characters and set a maxlength with TinyMCE”
How can I use that in buddypress? I would need to use the wordcount plugin and edit the tini.init script.
If I can’t implement that in buddypress is there any other solution for this issue?
We have a site that have BuddyPress and we installed the BP Classic plugin to keep the changes we had to our site after the version 12 update. On each of our Members pages, there is a Profile option and on that Profile option it is linked to /profile, but if you click on it, it will redirect back to that current member page. Same goes to Profile > View, it also have /profile/public link but it will also redirect to the current page when clicked.
This is a concern for us since we have Ahrefs audit on our sites and they highlighted this issue every time. Do we have an option to change it or maybe remove the links?
@shubhuofficial The settings tab is also not visible if the user is viewing another user’s profile. This is the default functionality in BuddyPress.
https://prnt.sc/UKnd4pO7_sjY
Nothing has changed. This is the code I’ve tried to use.
function my_custom_buddypress_function() {
var_dump(__FUNCTION__);
if ( ! function_exists('xprofile_get_field_data') ) {
echo '<pre>BuddyPress xprofile component has not been loaded yet.</pre>';
} else {
echo '<pre>';
var_dump(xprofile_get_field_data('Targa', wp_get_current_user()->ID));
echo '</pre>';
}
exit;
}
add_action('bp_init', 'my_custom_buddypress_function', 20);
And this is the output I received:
string(29) “my_custom_buddypress_function”
BuddyPress xprofile component has not been loaded yet.
BuddyPress 12.5.0 is installed and active.
@Kokiri
Please change this function name “custom_bp_avatar_activity” and keep it unique and please remember this also that this will create a new activity So, you will get two activity for single profile uploads.
// Add action to show new avatar in activity stream
function bp_generate_custom_avatar_activity($user_id, $args) {
// Get the user data
$user = get_userdata($user_id);
$user_link = bp_core_get_userlink($user_id);
// Create the activity entry
bp_activity_add(array(
‘user_id’ => $user_id,
‘action’ => sprintf(__(‘ % s has updated their avatar newly.’, ‘buddypress’), $user_link),
‘component’ => ‘profile’,
‘type’ => ‘new_avatar’,
‘item_id’ => $user_id,
));
}
add_action(‘bp_members_avatar_uploaded’, ‘bp_generate_custom_avatar_activity’, 10, 2);
First, ensure that BuddyPress is loaded and initialized before your plugin tries to call its functions. Since BuddyPress hooks its initialization to WordPress bp_init action, which typically fires on wp or init at a priority of 10, you should ensure your hook runs after this or directly on bp_init with a lower priority (higher number).
You can try to debug like this.
function my_custom_buddypress_function() {
if ( ! function_exists('xprofile_get_field_data') ) {
error_log('BuddyPress xprofile component has not been loaded yet.');
} else {
// Your code here
}
}
add_action('bp_init', 'my_custom_buddypress_function', 20);
It keeps throwing the same error: The function does not exist. I’m already developing a plugin and I’m inside a init callback.
Hasn’t BP been auto-loaded yet at this stage?
I also tried to recursively auto-load every single file contained in the buddypress/ folder. But this is not enough as I encounter other dependency errors. Therefore there must be a function/method/class to invoke in order to properly set up the system.
Ensure the BuddyPress plugin is active and add custom code in child theme functions.php or a custom plugin or using the code snippet plugin. xprofile_get_field_data is a valid function https://hooks.wbcomdesigns.com/reference/functions/xprofile_get_field_data/
Thanks for your reply. The problem is that I’m getting the following error message:
Fatal error: Uncaught Error: Call to undefined function xprofile_get_field_data()
I’ve also tried to use the following code to auto-load the BuddyPress dependencies:
require_once WP_PLUGIN_DIR . '/buddypress/bp-loader.php';
What’s the correct way to auto-boot BuddyPress?
@mattdotnet BuddyPress does not save profile field values inside the user meta
you can fetch them using the following approach and sync them with your requirement
$field_name_gender = 'Gender'; // Replace with your actual xProfile field name
$field_name_location = 'Location'; // Replace with your actual xProfile field name
// Get the xProfile field values
$gender_value = xprofile_get_field_data($field_name_gender, $user_id);
$location_value = xprofile_get_field_data($field_name_location, $user_id);
Buddypress by default provide the creating activity on profile uploads.
https://prnt.sc/qg-NDzJP9nll
If you want to add your custom activity as you have given in your code snippet you can use it like this because hook is deprecated.
// Add action to show new avatar in activity stream
function custom_bp_avatar_activity($user_id, $args) {
// Get the user data
$user = get_userdata($user_id);
$user_link = bp_core_get_userlink($user_id);
// Create the activity entry
bp_activity_add(array(
‘user_id’ => $user_id,
‘action’ => sprintf(__(‘ % s has updated their avatar newly.’, ‘buddypress’), $user_link),
‘component’ => ‘profile’,
‘type’ => ‘new_avatar’,
‘item_id’ => $user_id,
));
}
add_action(‘bp_members_avatar_uploaded’, ‘custom_bp_avatar_activity’, 10, 2);
https://prnt.sc/DHAc_eWrYJY7
1. Which version of WordPress are you running?
6.5.4
2. Did you install WordPress as a directory or subdomain install?
Dir
3. If a directory install, is it in root or in a subdirectory?
Root
6. Which version of BP are you running?
12.5.1
8. Do you have any plugins other than BuddyPress installed and activated? If so, which ones?
Ad Inserter
Advanced Editor Tools
Akismet Anti-spam: Spam Protection
BP Classic
Classic Widgets
Elementor
Envato Market
Happyforms
Playerx Core
Playerx Instagram Feed
Playerx Twitter Feed
reCaptcha by BestWebSoft
Sidebar Login
Site Kit by Google
TablePress
Ultimate Category Excluder
VFB Pro
VFB Pro – Form Designer
VFB Pro – Notifications
Webhook for Discord
Wordfence Security
WoW Progress
WP Discord Invite
WP-Optimize – Clean, Compress, Cache
WPBakery Page Builder
Yoast SEO
10. Which theme do you use ?
Playerx
11. Have you modified the core files in any way?
No
12. Do you have any custom functions in bp-custom.php?
No
15. Which company provides your hosting?
Top.Host
16. Is your server running Windows, or if Linux; Apache, nginx or something else?
Linux
17. Which BP Theme are you using?
Tried both legacy and new.
18. Have you overloaded any BuddyPress template files.
No
PS: I used this code in conjunction with the buddypress tool (Repair total members count):
/*
* Paste in your theme functions.php or in bp-custom.php.
* Load the site in a browser
* Remove from your theme functions.php or bp-custom.php.
*/
function buddypress_add_last_activity() {
$members = get_users( 'fields=ID' );
// $members = get_users( 'fields=ID&role=subscriber' );
foreach ( $members as $user_id ) {
bp_update_user_last_activity( $user_id, bp_core_current_time() );
}
}
add_action('bp_init', 'buddypress_add_last_activity' );
Hi Buddypress Community,
I have the weirdest issue regarding users.
My Admin dashboard shows ALL users (ALL 1,734 Participants 1,732 and Subscribers 1,732).
All of them have been active on the site (I used some PHP code to make all members active to ensure everyone shows up).
But when I go to all members in the buddypress activity wall on the front end of the site, i see MORE! It shows 1,786 Users…!
– What is going on, and how to fix that so there’s no user discrepancy.
Many thanks
Adi
I tried writing this code however no luck.
<?php
// Add action to show new avatar in activity stream
function custom_bp_avatar_activity($user_id, $args) {
// Get the user data
$user = get_userdata($user_id);
$user_link = bp_core_get_userlink($user_id);
// Create the activity entry
bp_activity_add(array(
‘user_id’ => $user_id,
‘action’ => sprintf(__(‘%s has updated their avatar.’, ‘buddypress’), $user_link),
‘component’ => ‘profile’,
‘type’ => ‘new_avatar’,
‘item_id’ => $user_id,
));
}
add_action(‘xprofile_avatar_uploaded’, ‘custom_bp_avatar_activity’, 10, 2);
// Add action to show profile update in activity stream
function custom_bp_profile_update_activity($user_id, $posted_field_ids, $errors, $old_values, $new_values) {
// Get the user data
$user = get_userdata($user_id);
$user_link = bp_core_get_userlink($user_id);
// Create the activity entry
bp_activity_add(array(
‘user_id’ => $user_id,
‘action’ => sprintf(__(‘%s has updated their profile.’, ‘buddypress’), $user_link),
‘component’ => ‘profile’,
‘type’ => ‘updated_profile’,
‘item_id’ => $user_id,
));
}
add_action(‘xprofile_updated_profile’, ‘custom_bp_profile_update_activity’, 10, 5);
?>
Hi, in our theme is incuded the Youzify Plugin that manages some graphic settings. At the moment we solved the header problem with Youzify, but it has limited settings.
This is the actual situation of the site:
the portal is divided in 3 main areas: community for members, specialist psychologists area, courses.
We think to manage the community with Buddypress, so to make that users can share info between themselves. For courses we use Learnpress.
Home page: “psicologiaintribunale.it/2023 ”
Community page: ” psicologiaintribunale.it/2023/la-community/ ”
Specilist page: ” psicologiaintribunale.it/2023/cerca-il-tuo-psicologo-giuridico/ ”
For membership we are using PMP.
Please be free to suggest us the best solutions to make better the site.
Okay let me put this short and simple – first of all I’m not a spammer I’m a regular user requesting support for buddypress…. Just cause I don’t have a profile picture doesn’t automatically mean I’m a spammer. Does somebody need to see my driver license to prove it?
Why isn’t there a way to ban users permanently or set a time until their allowed with a custom message?
Yes, let”s do that. I think this must be something to do with your theme template, since my theme does not have this issue and I do not think it’s anything to do with Buddypress.
It may be that your theme creator will not want to support Buddypress, but you should ask them. However, I have a suggestion for a workaround if they do not want to do this.
I also use a plugin to set a custom header per page, and this works on my BP sites.
Unique Headers
Thanks! 🙂
What I can see is that the group menu option that you picked is pointing some odd post_type=buddypress url, which is wrong, it should simply point to https://yoursite.com/groups (or your translation of the word groups.
You can either try editing that menu item, or create a custom link to that URL. (yoursite,com should be your own site address).
Is that a psychology site you have there?
We have 2 menu links: the first to buddypress members page and the second to buddypress groups.
These were running but from 2 days we have page 404.
We dad tried to reset the slugs but the system had deleted all pages. Now we restored the site from a backup.
How can we solve the not running links to buddy pages?
Thanks in advance
Hi, we finded a database bkp in the hoster panel and recovered the site. We yet have the problem on the Buddy pages link (404).
About slugs we had followed the link steps: settings -> Buddypress -> reset slugs to default ones.
Ho could we solve the 404 page?
Thanks