Skip to:
Content
Pages
Categories
Search
Top
Bottom

wp and bp profile syncing–works only sporadically

  • Avatar of Dan Butcher
    Dan Butcher
    Participant

    @danbutcher

    I’m running mu2.8.6/bp1.1.3, and the problem I’m having is that most of the time, when my students register on the site and complete the BP profile, that information is not synced with the WP profile. The BP profile will show the full name, but when I go to the WP profile on the backend, I see only the username and nickname fields are populated, and the others are blank; the display name shows the username.

    So, when that student comments on a post, her username is shown, and there’s no link back to her profile. However, a few students register (for instance, one did just a few minutes ago) and all their information is fully synced–the WP profile shows username, first name, last name, the display name shows first and last, and the URL is the BP profile.

    I have not been able to determine what, if anything, these few exceptions do differently to have their profiles sync. I’m assuming that these exceptions are what is supposed to be the rule when profile syncing is working correctly.

    Any ideas on what I can do to get this working correctly all the time?

Viewing 12 replies - 26 through 37 (of 37 total)
  • Avatar of Mike Pratt
    Mike Pratt
    Participant

    @mikepratt

    @djpaul don’t worry, I don’t think he’ll do it :-)

    @bowe Here is an example of what’s in 1.2 right now (@Andy – is this what you were talking about?)

    from single.php

    <div class=”author-box”>

    <?php echo get_avatar( get_the_author_email(), ’50′ ); ?>

    <p><?php printf( __( ‘by %s’, ‘buddypress’ ), bp_core_get_userlink( $post->post_author ) ) ?></p>

    </div>

    So in the same code block we get the WP based avatar while getting the BP based Name. Hmm. Not sure why but I am going to use either bp_loggedin_user_avatar() or bp_member_avatar() instead, or possibly bp_core_fetch_avatar() feeding in the id via bp_core_fetch_avatar($post->post_author) but I am just flying by the seat of my pants and have not tried it yet.

    I do know this. We know who the post author is. We know he has a username. That username is the same in WP or BP, so we can get his BP avatar and other info via that route. The rest is theming.

    Avatar of John James Jacoby
    John James Jacoby
    Keymaster

    @johnjamesjacoby

    @Dan Butcher

    There are two ways users can back themselves into this corner and they come from how their accounts were setup in the first place and what they do with them afterwards.

    Try this BP to WP Profile Sync plugin I just wrote up for you, and let me know how it goes?

    @peterverkooijen

    I know this is something that you’re passionate about, and xprofile will get a good makeover in 1.3, but this IS the best way to handle names for all audiences, at least until someone can come up with a solution that somehow makes more sense. I also know that you’re trying to be helpful, but this isn’t the topic to have this debate in.

    Avatar of Mike Pratt
    Mike Pratt
    Participant

    @mikepratt

    @jjj can you expand upon which corner you are referring to user backing themselves into?

    Avatar of John James Jacoby
    John James Jacoby
    Keymaster

    @johnjamesjacoby

    The first way is for users that may have been registered before BuddyPress was installed. They can still login, post comments, and use the forums, but if they never edited their profile and set their display name(fullname), BuddyPress won’t find them.

    The second is if a user edits their profile from the WordPress side (firstname, lastname, nickname) without changing their BuddyPress display name. At that point the two will be out of sync.

    It’s possible to hook into the save profile action of WordPress and change the BuddyPress display name when the user changes their WordPress nickname, but some sites may want a combo of the firstname/lastname while others may want to use the nickname, and others still may not really even care or use either. From that perspective it makes sense to not have BuddyPress try to interfere too deeply with syncing profile fields that might not have a direct 1 to 1 relationship with each other.

    Avatar of Peterverkooijen
    peterverkooijen
    Participant

    @peterverkooijen

    @JJJ, you are basically saying that it’s up to the end users/members to keep their data synchronized? And if it’s not, it’s their problem? It’s just not a very user-friendly approach.

    Also, I’m very much in favor of keeping all options open for all use cases, but Buddypress does not offer any built-in firstname/lastname option. Simple built-in syncing with wp_usermeta upon activation like in my custom function would solve that problem and wouldn’t hurt anybody.

    Maybe Andy refuses to include it in the core just to spite me, which would be at least somewhat understandable…

    Avatar of Andy Peatling
    Andy Peatling
    Keymaster

    @apeatling

    Don’t flatter yourself. ;)

    Avatar of Mike Pratt
    Mike Pratt
    Participant

    @mikepratt

    seriously, @Peter, you give yourself too much credit.

    I would, however, be curious to know if there is a reason bp didn’t make use of the rudimentary profile fields already available through WP? If it was inadvertent, that’s fine, but if there was a deliberate reason, Id’ find that of interest.

    Avatar of John James Jacoby
    John James Jacoby
    Keymaster

    @johnjamesjacoby

    @Mike Pratt

    I think from a development perspective, it was easier to avoid the WP profile entirely, since it’s far too limited in what you can do with it. Like you can’t (in the DB) easily tell the WP profile screen which dynamic field type to use for each dynamic field. Since BuddyPress took the direction of being entirely theme based, it made sense to make a whole new profile with a more direct apprach to setting the fields and getting/updating the data.

    For 1.3 there will be a more powerful xprofile system that makes for smarter fields.

    Avatar of Mike Pratt
    Mike Pratt
    Participant

    @mikepratt

    @jjj sounds great, thx

    Avatar of kenrichman
    kenrichman
    Participant

    @kenrichman

    I am disappointed that BuddyPress does not simply use and extend the WP profile fields. It complicates things.
    And synching profiles with mailchimp plug-ins is now more complex – ok it doesn’t work – for me anyway.
    BuddyPress is a WP plug-in, not a standalone system so it should plug in to WP, including profiles. Bp says it offers extended profiles, not different profiles.
    Incidentally my users want Last name, First name, just to complicate things further.

    @johnjamesjacoby Hi John, I am reading your comments and appreciate your knowledge and skills. I am about to also try to find your plugin. (I am not a programmer so most of the instructions went over my head – I do the design/art direction part).

    I have a project I took on as a probono to develop an mu site for a National Park Service Collaborative http://www.intooutside.org. I created a wordpress site with Buddy Press, and we are finishing the content integration and signing up users. There are a lot of ways I could use your savvy and help…as I am limited in my coding skills. The project is to inspire kids to get outside into the wilderness and to create a forum for them to share their stories.

    Are you available to talk about the site I am making and struggling with? If so, how may I contact you? You may send me an email via creative-entity(com)/contact.html
    MANY THANKS!
    ~ :) Amy

    PS @mikepratt @apeatling If any of you other guys have a desire to help, I would REALLY appreciate. This is a non-profit project and I am in need ….I can offer some design trade, music, dance..

    @danbutcher I read your input . I have a project where we are collecting stories about youth experiencing the outdoors. I would love to invite you to participate either as a professor or to highlight student work that applies. Please take a look intooutside.org.
    :)

Viewing 12 replies - 26 through 37 (of 37 total)

You must be logged in to reply to this topic.