Skip to:
Content
Pages
Categories
Search
Top
Bottom

Buddypress x-profile visibility doesn't work


  • envieme
    Participant

    @envieme

    Am on BP 1.8 and somehow can’t get x-profile visibility to work. It doesn’t seem to respect the default visibility options set by the admin. Yet it does work once the user themselves change the visibility settings (again) via their profile.

    For instance, as admin I set default profile field visibility of “admins” only to a text field location. Yet all users who already have the field set as well as new users do not have it visible to everyone. But if the user edits his profile and again sets it to “admin only” it works as it should and doesn’t appear in the user profile when viewed publicly as non-admin. Same for loggedin members as well.

    Other things to consider about my Buddypress install are:
    1) Use ultimate facebook registration and no access to wordpress default registration
    2) I imported all my users (some wp and largely others bp) into this bp installation manually via sql import from previous a installation
    3) I would prefer not to post a public link here to my site but can share on PM if anyone wants to look at it.

    Thank you

Viewing 14 replies - 1 through 14 (of 14 total)

  • bp-help
    Participant

    @bphelp

    @envieme
    I can’t recall it but I have seen this issue on the forums before when it dealt with importing members and not respecting the default profile visibility. Maybe a search through the forums will help and if I am not wrong it was resolved so maybe doing a search can help. If not perhaps another volunteer will provide you a better solution. Good luck!


    envieme
    Participant

    @envieme

    @bp-help Thanks for reverting back quickly. I did search before I posted and the only one that found similar to my case was https://buddypress.org/support/topic/how-do-i-hide-extended-profile-fileds-from-users/

    But I haven’t used the plugin the post mentions about, I did a backend database import by exporting and importing sql.

    And I have done all the standard steps I do when something is amiss in WP or BP like deactivating all plugins and reverting to default theme. Yet the problem persists. Further I noticed in my DB that a meta field bp_xprofile_visibility_levels is only set for a handful of users in the users_meta table. Though it being set doesn’t really set the visibility level properly.


    Ben Hansen
    Participant

    @ubernaut

    Have you tried confirming this behavior on a fresh install? If so i’d put in a trac ticket otherwise you’re probably going to be on your own for that one. It’s possible your import process is the root of the cause.


    envieme
    Participant

    @envieme

    I haven’t tested it on a fresh install and assume the problem is with my instance. May be after the import something got messed up.

    But then when new members register, I expect Buddypress should be setting the default profile visibility settings which is not the case.

    Any ideas on what could have gone wrong would be really helpful. Thanks.


    envieme
    Participant

    @envieme

    Hi there, just nudging to see if there’s a work around or hack in BP code I can do to enforce desired x-profile visibility levels as in my case users need not have an option to choose their visibility levels. So I hope someone can point me in the right direction on how to hardcode the visibility levels for my x-profile fields in the code.

    Many thanks.


    Ben Hansen
    Participant

    @ubernaut

    Above my php paygrade (0) sorry. Maybe someone else has an idea.


    envieme
    Participant

    @envieme

    Just one more nudge on this. As this is really important in securing the privacy on my site members.

    I was successfully able to set my own profile privacy levels editing it from front end. So I see the bp-x-profile-visibility-levels field in user_meta table with value:
    a:7:{i:1;s:6:”public”;i:2;s:8:”loggedin”;i:3;s:8:”loggedin”;i:4;s:8:”loggedin”;i:7;s:10:”adminsonly”;i:8;s:10:”adminsonly”;i:11;s:6:”public”;}

    Is there a simple SQL that I can execute to make all users get this field in their user meta and set to this value? Can someone with SQL knowledge help?

    Thanks


    sbahns
    Participant

    @sbahns

    I have this exact same issue and need to fix it ASAP. Anyone have a solution?


    trinzia
    Participant

    @trinzia

    Same issue (details below)

    In this file {themename}\members\single\member-header.php, is the following code:

    		<?php
    		/***
    		 * If you'd like to show specific profile fields here use:
    		 * bp_member_profile_data( 'field=About Me' ); -- Pass the name of the field
    		 */
    		 do_action( 'bp_profile_header_meta' );
    
    		 ?>
    

    I have some custom profile fields, so I replaced the ‘do_action’ with these:

    		<h3>About Me<h3>
    		<?php bp_member_profile_data( 'field=About' ); ?>
    
    		<h3>Birthday</h3>
    		<?php bp_member_profile_data( 'field=Birthday' ); ?>
    

    When I click on the Edit Profile link, I can change visibility settings, and it appears to save them. BUT the saved settings don’t do anything. In another browser where I’m not logged in at all, I can always see all of the fields listed, no matter which settings were chosen.

    Advice?


    Ben Hansen
    Participant

    @ubernaut

    if this is a common problem someone should add a ticket in trac.


    trinzia
    Participant

    @trinzia

    I’m new so I don’t know what trac is, and whether this is an issue or if I’m doing it wrong.


    Ben Hansen
    Participant

    @ubernaut

    trac.buddypress.org sounds like a bug to me.


    shanebp
    Moderator

    @shanebp

    Visibility checks are not done when profile data is retrieved ‘outside’ BP_XProfile_Group.

    You can use bp_xprofile_get_hidden_fields_for_user() to do your own check.

    It is reasonable to expect bp_member_profile_data() to include an argument re visibility check.

    So it’s not a bug, but you can create an enhancement request ticket on trac.


    serks
    Participant

    @serks

    Hi have a very similar issue and I think it may be related to the same cause.

    I have set up a xprofile group where I have a bunch of different radio fields like so…

    About You Widget
    Show | Hide

    Display Avatar On Profile
    Show | Hide

    Subscribed Member Badge
    Show | Hide

    etc.

    I have put code all around my website to show or hide things according to a users settings and it all works as it should BUT, the only problem is that the settings don’t take effect until a user goes to edit the particular profile group and clicks the ‘Save Changes’ button.

    Even though the defaults are set as they should be initially, they do not actually work until the user saves them.

    Any help on this issue would be much appreciated.

    Thanks

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Buddypress x-profile visibility doesn't work’ is closed to new replies.
Skip to toolbar