Skip to:
Content
Pages
Categories
Search
Top
Bottom

Functions defined by BuddyPress undefined in multisite….


  • chadriston
    Participant

    @chadriston

    I am running WordPress -v 5.8.3, and installed BP -v 10.0.0 ~2 months ago. I am using WP multisite, set to install sites as subdirectories. I have defined define( ‘BP_ENABLE_MULTIBLOG’, true ); in the wp_config.php file, and now it hangs and reports the below error when running a members page within the subsite. It works as usual in the main site, though.

    
    [08-Mar-2022 22:00:33 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function bp_nouveau_is_object_nav_in_sidebar() in public_html/wp-content/themes/nextarch-child/buddypress/members/index.php:13
    Stack trace:
    #0 public_html/wp-includes/template.php(772): require()
    #1 public_html/wp-content/plugins/buddypress/bp-core/bp-core-template-loader.php(222): load_template('/home/713369.cl...', false, Array)
    #2 public_html/wp-content/plugins/buddypress/bp-core/bp-core-template-loader.php(67): bp_locate_template(Array, true, false, Array)
    #3 public_html/wp-content/plugins/buddypress/bp-core/bp-core-template-loader.php(407): bp_get_template_part('members/index', NULL, Array)
    #4 public_html/wp-content/plugins/buddypress/bp-members/classes/class-bp-members-theme-compat.php(144): bp_buffer_template_part('member in public_html/wp-content/themes/nextarch-child/buddypress/members/index.php on line 13
    

    I’d greatly appreciate understanding why this is occurring, and how I can fix it. It seems the functions defined by bp core are not accessible when in the sub-site, despite bp being activated in the network and the global constant BP_ENABLE_MULTIBLOG being defined as true in the wp_config file.

    Thanks,
    Chad

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi,

    That’s not a function defined into BP Core. It’s a function defined into the BP Template Pack « BP Nouveau ». My guess is your theme is not checking the BP Nouveau Template pack is active before using one of its functions. In WP Admin > Settings > BuddyPress options, Check what is the active template pack, there’s a good chance it’s BP Legacy, switch to BP Nouveau and it will fix the issue.


    chadriston
    Participant

    @chadriston

    Hello, thank you for your response. I switched over to using the bp-legacy templates in my child theme dir and they seem to work as expected, verifying what you are saying.

    Thanks again,

    Chad


    chadriston
    Participant

    @chadriston

    So one other question, is there a straight-forward way to programmatically set the default bp-template to Nouveau for each additional sub-site?


    chadriston
    Participant

    @chadriston

    Also, it appears that in the multisite mode, when accessing <subdomain>/members/<user> it does not pick up my child theme’s buddypress/members/single/front-member-type-type.php file. I have manually set the sub-site bp option to use the nouveau template, and the active theme is the correct child theme.

    Thanks,

    Unless you created a member type called ‘type’ and assigned the member you’re displaying to this type, the buddypress/members/single/front-member-type-type.php shouldn’t load. Instead of the second ‘type’ in your template filename, you need to use the name of your member type. If I created a “student” member type, assigned it to a user and added a buddypress/members/single/front-member-type-student.php template it should be used when I display the user having a student type.


    chadriston
    Participant

    @chadriston

    Sorry, I did not notate that well in the post above, should have been buddypress/members/single/front-member-type-{type}.php.

    Ok, this is correct. So the right behavior in this case would be to use your template if the displayed member has the {type} member type. If it’s not the case what are the member types assigned to the member? Is there more than one?

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar