BuddyDev

Search

Replies

  • Participant
    Level: Master
    Posts: 222
    Mike (DesignServe) on #28426

    Thanks Brajesh, that fixed it!

  • Participant
    Level: Master
    Posts: 222
    Mike (DesignServe) on #28400

    Hi Brajesh,

    Thank you I hope you and family are well.

    I have the following code in my child theme and I’m trying to eliminate php notices (Trying to get property of non-object) by reference to the logs.

    
    /**
     * Sync Buddypress Name to Username
     */
    
    function my_member_username() {
    	global $members_template;
    
    	return $members_template->member->user_login;
    }
    add_filter( 'bp_member_name' , 'my_member_username' );
    
    function my_bp_displayed_user_fullname() {
    	global $bp;
    
    	return $bp->displayed_user->userdata->user_login;
    }
    add_filter( 'bp_displayed_user_fullname' , 'my_bp_displayed_user_fullname' );
    

    The line at issue is (line 54):

    
    	return $bp->displayed_user->userdata->user_login;
    

    Here are the pointers:

    
    wp-content/themes/Avada-child/functions.php:54
    my_bp_displayed_user_fullname()
    wp-includes/class-wp-hook.php:288
    apply_filters('bp_displayed_user_fullname')
    wp-content/plugins/buddypress/bp-members/bp-members-template.php:1885
    bp_get_displayed_user_fullname()
    wp-content/plugins/buddypress/bp-activity/classes/class-bp-activity-component.php:434
    BP_Activity_Component->setup_title()
    wp-includes/class-wp-hook.php:288
    do_action('bp_setup_title')
    wp-content/plugins/buddypress/bp-core/bp-core-dependency.php:174
    bp_setup_title()
    wp-includes/class-wp-hook.php:288
    do_action('bp_init')
    wp-content/plugins/buddypress/bp-core/bp-core-dependency.php:252
    bp_init()
    wp-includes/class-wp-hook.php:288
    do_action('init')
    wp-settings.php:523
    

    Without going to much trouble, do you have any ideas that might help?

    Many thanks,
    Mike

  • Participant
    Level: Master
    Posts: 222
    Mike (DesignServe) on #28329

    PHP errors (notification) for core avatars is fixed here:

    https://buddypress.trac.wordpress.org/attachment/ticket/8177/bp-core-avatars.patch

    This will help prevent your log from filling with a huge number of entries each day.

  • Participant
    Level: Master
    Posts: 222
    Mike (DesignServe) on #26494

    PPS I just want to be sure, for example, if I make the Member Types in the sub-site, should I make the same Member Type in the main site? Or does the Member Type only apply to each sub-site?

    Because it is my first live sub-site I’ve become a bit confused. I noticed that Members from the main site can log in to the sub-site as I expected. However, they get the Participant Role and they don’t get the Subscriber Role. This means I can’t give them a network-wide badge (because we can’t give Participants a badge). I expected they would get the subscriber Role, that is one reason why I got confused about it.

    To clarify, as a minimum I wanted every Member on every site to have the Member Type of “Community Member”.

    Thanks

  • Participant
    Level: Master
    Posts: 222
    Mike (DesignServe) on #26492

    Also, if I set up member Types and Badges separately in the sub-site, is it ok to have the same names for the Member Types as in the main site? Currently, I Synchronise the users from sub-sites to main site with a User Sync plugin.

  • Participant
    Level: Master
    Posts: 222
    Mike (DesignServe) on #26334

    members/ means that exact slug is not cached.

    members/* means that members/ and all slugs below it are not cached. So for example, profile editing wouldn’t be cached or anything else that includes that slug

    Sorry got to be brief 🙂

  • Participant
    Level: Master
    Posts: 222
    Mike (DesignServe) on #26311
    This reply has been marked as private.
  • Participant
    Level: Master
    Posts: 222
    Mike (DesignServe) on #26310

    Thank you Brajesh I’ll be able to test in the next few days. Let me know if I owe you a payment.

  • Participant
    Level: Master
    Posts: 222
    Mike (DesignServe) on #26300
    This reply has been marked as private.
  • Participant
    Level: Master
    Posts: 222
    Mike (DesignServe) on #26299
    This reply has been marked as private.