Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 1 through 25 (of 4,112 total)
  • Author
    Search Results
  • GyziieDK
    Participant

    Hello

    I’m just curious, but what is the “select2” supposed to do? – Is this a secondary plugin you’ve got or what is the purpose of this?

    The Xprofile fields are capable on its own to support multi-select, so I’m just a bit confused on what you’re trying to accomplish here and what the actual issue is?

    Maybe a more detailed description would make it easier to try and troubleshoot this. 🙂

    #335662
    wpuser
    Participant

    Hi there,

    I had the issue with posting a reply yesterday too. Weird.
    That is why I split my message in 2 and than I could post it.

    I was able to read your share txt and the next replies and also view that images.

    Anyway… I am willing (if you are willing to put the time in it) to give you access to my staging site, but I rather not post the link in public, to avoid traffic from Google and such to that staging website. But there does not seem to be a way to share the link with you in private. Do you have any suggestions?

    To further explain my situation: I did not make any customizations to my buddypress or xprofile plugin that have anything to do with the profile fields. From the clean install, the “Name” field is already there from the start, when installing the buddypress plugin.

    I am not adding users via the admin section, I am letting them signup via the website register form. So following this process, the situation is as described before, where the “Name” will be filled in by the user as part of the registration process. The Name field is mandatory, set by Buddypress, which I can not influence nor rename.

    I did nothing to influence the Name field, other than translating it like I explained before.
    The Name is operating as a seperate field, that does not seem to link to username by default. And that is also not what I want. Because it would lead to the username being shown twice on a profile page, which is ridicilous of course. Since you can not block or hide the Name field, it will be there. Also, the Name field is always on the register form, and the field is mandatory (which you cannot change), so people CAN and probably will fill in something different than their username. Most likely their first name. Which is what happened on my site anyway, people fill in their regular first name. Only a handfull will choose like a second username/nickname for the field value. Anyway, in 99% process of the time, the Name field is populated with a different value than the username as a result of the website registration process (which is not changed, it is by default like that, since installing buddypress).

    I use the BuddyX theme. But the issue is not related to the theme, because using a default WordPress theme (like twenty two or so), will have the same result.

    So, it poses as a problem, if the usernames show up on the userlist, but the sorting will go on the “Name” field, which is not identical to the username. This will lead to a really undesired situation, where the sorting does not seem to work properly on the frontend, because “invisible” the userlist is sorted on the Name field.

    And also, this is new. Before, this was not the case. It did NOT sort on the “Name” field. And I’m oblivious why it does now, what is the intent by changing this.

    So, to address the situation, and to avoid having duplicate usernames on the profile page, I would rather stick with people using the Name field as their first name or something like that.

    I would like to sort on display name. Is there a way to do that? Do you have a suggestion?

    #335645
    wpuser
    Participant

    Also from my side, very much appreciated all the help and effort -> sorry for not mentioning that before! I was so hyperfocussed on the issue that I forgot human interaction.

    Anyways, again, thank you.

    To further empathize what I mean with the display name is this:

    Screenshot of a test user I just registered via the normal process on the website signup form:
    v1

    You see username, nicename, display name are automatically set same as the username (which is debbugger)
    I filled the “Name” field on signup with “Annie”, as a random name. and some other random fake user information. As you can see “Annie” is not showing up, only that “debugger” which I choose as my username.

    Screenshot of bp_xprofile_fields, where you can see the “Name” base field (1):
    v2
    As you can see, “Name” is hardcoded in the database. And this is mandatory. I had this translated to “Naam” before, but after the wordpress update, that was no longer allowed. It took me days to figure that out, but I am happy I found out. This thing was the sole reason everything like friendlist, userlist, etc. did not work anymore. Please note I am not allowed to rename or change any setting with regards to this field. I am also not allowed to delete it. I am stuck with it, it seems.

    (1/2)

    #335630
    GyziieDK
    Participant

    Also please note that the name field marked in the Users > Profile Fields with “(Primary)” IS the display name itself. This should be the field users use upon registration of their user – and this is also the field the BuddyPress Member Directory uses to sort content Alphabetical.

    #335629
    GyziieDK
    Participant

    Hello again 🙂

    This might start to make sense then!

    First, when you translate something within the code itself (not using a translation plugin and po/mo file) it will for the most part be overridden whenever you update your WordPress / plugins that are translated. So, this might be why it doesn’t work now after the update.

    I personally use a combination of LocoTranslate and TranslatePress. This is because BuddyPress activity is updated the way it is and for that reason LocoTranslate itself is not able to translate the dynamic content (like when activity updates – without the page doing so) – this TranslatePress supports.

    So, for the BuddyPress content that can’t be translated correctly using LocoTranslate, I use the TranslatePress for those. Both plugins are free to use, and it doesn’t require you to purchase any expensive addons.

    It’s important that you pick the right placement for your translation-files (custom, author, system). If they’re not in the right place the translation might not show up on the front-end. Also make sure you setup the settings within the LocoTranslate plugin not to override your translated files upon updating WordPress: Loco Translate > Settings > File system access > Modification of installed files & Editing of POT (template) files must be set to Disallow.

    For the display name, this should be the default value it sorts by. Mine by default sorts by display name. When you go to Users > Profile Fields – you can edit the different settings from within there with the names and what is mandatory/not mandatory.

    For the sorting part (or other features in the future) if it still causes issues, maybe a snippet code using a plugin like WPCode Lite might be a better solution rather than going into the code and edit it from there. In this way it will not get affected in most cases when you update WordPress, plugins and theme.

    Maybe some of this can help you – if not – then feel free to keep me updated. 🙂

    #335624
    GyziieDK
    Participant

    Sounds weird, since I’m also using the user fields (xProfile fields) – my site is translated into Danish, but my site-admin back-end it set to English. This is due to it being easier to find items in the menu when troubleshooting (hate when settings and so on is translated lol).

    So seems weird to me if the translation part of it is causing the issue, since I’m also using it, but not having the same issue?

    Hope you find a solution and it ends up working for you though! 🙂

    #335620
    wpuser
    Participant

    I managed to locate the issue. After the wordpress update, it was not allowing my translations for the xprofile fields anymore. For some reason it has to be English now, it is no longer allowing it to be Dutch. I’ll flag this with the WordPress development team.

    I’ll close the topic as the issue is likely not because of Buddypress but because of WordPress.

    How can I resolve./close this topic?

    #335531
    GyziieDK
    Participant

    Not sure if I got the option because of third party plugin I’ve got installed.

    But you should be able to change this as a setting under Users > Profile Fields.

    Normally you can set the different visibility settings in there, but “Name/Username” is normally fixed and can’t be changed from what I know.

    #335470
    gardendarts
    Participant

    The button to update the profile field is blocked by the type box. I cannot press update.

    See screen shot https://ibb.co/jyMvngr

    #335419
    flamuren
    Participant

    Hi,

    I am building a new buddypress website and want to set all spam preventions before going live.

    Does this honeypot code still work for buddypress register page?

    // BuddyPress Honeypot
    function add_honeypot() {
        echo '';
    }
    add_action('bp_after_signup_profile_fields','add_honeypot');
    function check_honeypot() {
        if (!empty($_POST['system55'])) {
            global $bp;
            wp_redirect(home_url());
            exit;
        }
    }
    add_filter('bp_core_validate_user_signup','check_honeypot');

    best regards,
    flamuren

    timdavid01
    Participant

    You can achieve a vertical display of profile fields in BuddyPress by adding some custom CSS. Try this:

    css
    #profile-fields .field {
    display: block;
    margin-bottom: 15px; /* Adjust spacing as needed */
    }
    Add this code to your theme’s custom CSS section or the Additional CSS section in the WordPress Customizer. This should stack your profile fields vertically with some space between them.

    Have you checked if your theme might have any specific settings that affect the layout of BuddyPress fields?

    stephunique
    Participant

    I have WordPress 6.6.2 and Buddypress 14.1.0 and in the edit profile page, the options are displayed horizontally like this: https://snipboard.io/DrOLiw.jpg

    This does not look good, they do not even have a gap between them. How can I make them display vertically like a list?

    notpoppy
    Participant

    My users are being confused by our ‘register’ page as it prompts them to enter a ‘Name’ twice. It prompts them to fill in six forms as follows:

    —–

    Account Details

    Username (required)
    Email Address (required)
    Choose a Password (required)
    Confirm Password (required)

    Profile Details

    Name (required)
    Name (required)

    —–

    Should the ‘Name’ option appear twice? It seems wrong.

    I have found the option to edit this in the WordPress admin under User > Profile Fields > Signup Fields. But although I can drag the two options which are labelled ‘Name (Primary) (required) (Sign-up)’, I cannot remove either of them. How can I fix this?

    I am using BuddyPress 14.1.0 and WordPress 6.5.3.

    astroo
    Participant

    Hello, BuddyPress community!

    I’m working on a packing website where users can customize their packaging options, specifically allowing them to select various features for a “custom box.” I’m trying to integrate this functionality with BuddyPress profiles, so each user can save their custom box preferences on their profile page.

    However, I’m running into some difficulties with saving and displaying these custom box selections. Is there a way to add custom fields to BuddyPress profiles that could store these specific packing choices? Alternatively, could anyone recommend a plugin or method for syncing this data with BuddyPress profiles seamlessly?

    Any advice or guidance would be greatly appreciated. Thanks in advance!

    #334981
    farhansheikh125
    Participant

    I’m looking to customize user profiles in BuddyPress to better suit my site’s needs. What are the best practices for:

    Adding custom fields and profile sections
    Ensuring seamless integration with existing themes
    Improving user interface and experience for profile pages
    Any recommended plugins or techniques for advanced customization
    I’d appreciate any advice or resources you can share to help with customizing BuddyPress profiles effectively.

    Thanks!

    #334865
    Renato Alves
    Moderator

    XProfile Fields in it, but only the full_name field is getting saved, all other fields are not getting saved when signup is complete.

    Now, it is important the signup fields are registered in the proper location.

    Confirm if your signup fields are correctly grouped here: your-site.com/wp-admin/users.php?page=bp-profile-setup In the Signup Fields group.

    xiaoyao
    Participant

    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

    #334836
    Pratik Londhe
    Participant

    I have added the request payload ans also the response to the xprofile/fields?signup_fields_only=true endpoint, but it doesn’t seem to be appearing under this post.

    #334830
    Pratik Londhe
    Participant

    I am sending the signup API data the way it is defined in the Documentation to add XProfile Fields in it, but only the full_name field is getting saved, all other fields are not getting saved when signup is complete.
    Any idea why this might be happening?

    #334792
    ladypersonal11
    Participant

    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.

    #334789
    sunil1988lits
    Participant

    Is there a way to validate the file type fields, before the saving to db. I am using this hook but it’s not working add_action( ‘xprofile_data_before_save’, ‘validate_required_unshared_fields’);

    #334750
    locker17
    Participant

    I want to make users able to add bullet or numeric lists to their profile page. Doesn’t matter if I chose wp user meta bio field or multiline xprofile field, both display lists in user profile as words with linebreaks (br). How can I avoid that and show it like it is saved in db?

    Same question here 3 years ago, unanswered.

    weird formatting with bulleted lists in user meta fields?

    powebdesign
    Participant

    Hello, I had this code, what it does is that certain users already enter with a subscription and can use the chat without having to pay. When updating to the latest version the code no longer works. Any idea what has changed?:
    add_filter(‘bp_get_total_member_count’,’bpfr_hide_get_total_filter’);
    function kleo_pmpro_default_level($user_id) {
    global $wpdb, $bp;

    //Change this with your field name
    $field_name= “i am”;

    //Change the field value
    $value_to_match = “woman”;

    //Membership level id
    $membership_level = 4;

    //Done editing
    $field_id = $wpdb->get_var( $wpdb->prepare( “SELECT id FROM {$bp->profile->table_name_fields} WHERE name = %s”, $field_name ) );
    if ($_POST[‘field_’.$field_id] == $value_to_match) {
    pmpro_changeMembershipLevel($membership_level, $user_id);
    }
    }

    if (is_multisite()) {
    add_action( ‘wpmu_activate_user’, ‘kleo_mu_pmpro_default_level’, 10, 4);
    } else {
    add_action(‘user_register’, ‘kleo_pmpro_default_level’);
    }

    Thanks!

    #334666
    sx1001
    Participant

    Hi all,

    we have a BP page with around 30 BP-Profile fields configured per user.

    We found that every individual field is queried indiviually twice, resulting in 60 queries for the field sanitization. One query is made to check for allowed HTML, this function
    bp_xprofile_is_richtext_enabled_for_field.

    So I’d have two suggestions for raw performance:
    1st:
    Any way to allow for a hook at the very start of function bp_xprofile_is_richtext_enabled_for_field to disable that check so that I can simply set “false” for all fields globally via Hook? Right now I have to patch bp_xprofile_is_richtext_enabled_for_field() and immediately “return false” right at the beginning. I don’t want HTML anyhow in our fields.

    2nd:
    This filter apply_filters( ‘xprofile_allowed_tags’, $xprofile_allowedtags, $data_obj, $field_id ); queries each and every ProfileField from DB once. At least it can be removed via unhooking.

    This is the call-chain for sanitization for allowed individual tags, it’s this call-chain (from bottom to top):

    BP_XProfile_ProfileData->populate
    BP_XProfile_ProfileData->__construct
    BP_XProfile_Field->get_field_data
    BP_XProfile_Field->populate
    BP_XProfile_Field->__construct
    BPXProfileCFTR\Filters\Xprofile_Kses_Filter->filter
    apply_filters(‘xprofile_allowed_tags’)
    xprofile_filter_kses
    xprofile_sanitize_data_value_before_display
    apply_filters(‘bp_get_the_profile_field_value’)
    bp_get_the_profile_field_value

    So overall, this function runs two queries per field and is the absolute killerblow to performance:
    xprofile_filter_kses().

    A fix would be highly appreciated. At least query all HTML-tag stuff in ONE query for all fields instead of doing it one by one.

    Thanks!

    #334662
Viewing 25 results - 1 through 25 (of 4,112 total)
Skip to toolbar