BuddyDev

Search

[Resolved] bp_is_user_forums undefined function error when loading page

  • Participant
    Level: Initiated
    Posts: 13
    Ethan on #15305

    After I have upgraded my website to buddypress 3.0.0, I now see the following error when I load the site. I am using community builder 1.1.2

    Fatal error: Uncaught Error: Call to undefined function bp_is_user_forums() in /opt/bitnami/apps/wordpress/htdocs/wp-content/themes/community-builder/buddypress/members/single/home.php:39 Stack trace: #0 /opt/bitnami/apps/wordpress/htdocs/wp-includes/template.php(690): require() #1 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/buddypress/bp-core/bp-core-template-loader.php(155): load_template(‘/opt/bitnami/ap…’, false) #2 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/buddypress/bp-core/bp-core-template-loader.php(61): bp_locate_template(Array, true, false) #3 /opt/bitnami/apps/wordpress/htdocs/wp-content/themes/community-builder/buddypress/members/single/index.php(43): bp_get_template_part(‘members/single/…’) #4 /opt/bitnami/apps/wordpress/htdocs/wp-includes/template-loader.php(74): include(‘/opt/bitnami/ap…’) #5 /opt/bitnami/apps/wordpress/htdocs/wp-blog-header.php(19): require_once(‘/opt/bitnami/ap…’) #6 /opt/bitnami/apps/wordpress/htdocs/index.php(17): require(‘/opt/bitnami/ap…’) #7 {main} t in /opt/bitnami/apps/wordpress/htdocs/wp-content/themes/community-builder/buddypress/members/single/home.php on line 39

    I do not see this error if I load a different theme (like the 2017 one)

    • This topic was modified 5 years, 11 months ago by Ethan.
  • Participant
    Level: Initiated
    Posts: 13
    Ethan on #15307
  • Keymaster
    (BuddyDev Team)
    Posts: 24212
    Brajesh Singh on #15308

    Hi Ethan,
    Thank you for notifying.

    Please upgrade to 1.1.3. It adds compatibility with BuddyPress 3.0.

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 13
    Ethan on #15315

    Is there an easy way to upgrade beyond deleting the theme and reimporting it?

  • Keymaster
    (BuddyDev Team)
    Posts: 24212
    Brajesh Singh on #15318

    Hi Ethan,
    Please install and configure BuddyDev Dashboard
    https://buddydev.com/plugins/buddydev-dashboard/

    It allows you to automatically update our themes/plugins.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 2
    alberto on #15832

    I did it, but the error seems be there …. In my case

    PHP Fatal error: Call to undefined function bp_is_user_forums() in /nas/content/live/cideb/wp-content/themes/boss/buddypress/members/single/home.php on line 71
    [Fri Jun 22 02:38:51.753993 2018] [:error] [pid 8865] [client xxxxxxxxxxx:32222] [CRITICAL] : Call to undefined function bp_is_user_forums()

    Any other solution ? This error gets me google search 500 error …..
    Thanks

  • Keymaster
    (BuddyDev Team)
    Posts: 24212
    Brajesh Singh on #15840

    Hi Alberto,
    Please open boss/buddypress/members/single/home.php

    You will see some code like this

    
    
            		elseif ( bp_is_user_profile() ) :
            			bp_get_template_part( 'members/single/profile'  );
    
            		elseif ( bp_is_user_forums() ) :
            			bp_get_template_part( 'members/single/forums'   );
    
            		elseif ( bp_is_user_notifications() ) :
            			bp_get_template_part( 'members/single/notifications' );
    
            		elseif ( bp_is_user_settings() ) :
            			bp_get_template_part( 'members/single/settings' );
    
    

    All we need to do is comment the following lines like this

    
    
            		elseif ( bp_is_user_profile() ) :
            			bp_get_template_part( 'members/single/profile'  );
    
    //        		elseif ( bp_is_user_forums() ) :
    //        			bp_get_template_part( 'members/single/forums'   );
    
            		elseif ( bp_is_user_notifications() ) :
            			bp_get_template_part( 'members/single/notifications' );
    
            		elseif ( bp_is_user_settings() ) :
            			bp_get_template_part( 'members/single/settings' );
    
    

    That will fix it. The function was deprecated in BuddyPress 3.0. That’s why you are getting the fatal error.

  • Participant
    Level: Initiated
    Posts: 2
    alberto on #15887

    Hi. I did it …. problem solved … Thank you very much ….

  • Keymaster
    (BuddyDev Team)
    Posts: 24212
    Brajesh Singh on #15899

    You are welcome. Marking it as resolved.

The topic ‘ [Resolved] bp_is_user_forums undefined function error when loading page’ is closed to new replies.

This topic is: resolved