Skip to:
Content
Pages
Categories
Search
Top
Bottom

Trying to remove bbPress causes Critical error


  • ollietubb1
    Participant

    @ollietubb1

    Hi there,

    I have been testing bbPress for my site but I am not sure it is the right fit.
    And so, I disable it and it causes a critical error in WordPress. I enable it again and the site comes back.

    I am using WP 5.9, DIVI theme 4.14.7

    Site: https://wbc1.otiscreative.co.uk/

    I would like to test BuddyPress but I don’t want to do this while I have this issue with bbPress.

    Let me know if you need any further info.

    Many thanks,
    Ollie

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

  • Robin W
    Moderator

    @robin-w

    it maybe a dependant plugin issue? ie an additional plugin which needs bbpress

    so the standard fault finding applies viz…

    it could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentytwenty, and see if this fixes.

    Plugins

    If that doesn’t work, also deactivate all plugins apart from bbpress and then deactivate bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users

    Health Check & Troubleshooting

    Then come back


    ollietubb1
    Participant

    @ollietubb1

    Hi Robin,

    Thank for your reply and advice.

    Can I ask, is there any danger of losing any data by switching to another theme or disabling plugins? Just makes me a little nervous that I switch to another theme and then everything I have built with Divi is gone!

    Thank you,
    Ollie


    Robin W
    Moderator

    @robin-w

    what other plugins do you have ?


    ollietubb1
    Participant

    @ollietubb1

    Quite a lot as I am using PM Pro with many of it’s add-ons.


    Robin W
    Moderator

    @robin-w

    ok, so what bbpress related other plugins do you have if any?


    ollietubb1
    Participant

    @ollietubb1

    PMPro – bbPress Add On


    ollietubb1
    Participant

    @ollietubb1

    I can deactivate that no problem

    When I deactivate bbPress is when i get a critical error, as soon as activate all is fine again.


    Robin W
    Moderator

    @robin-w

    so if you decativate ‘PMPro โ€“ bbPress Add On’ first and then deactivate bbpress – does that work?


    ollietubb1
    Participant

    @ollietubb1

    Unfortunately not!


    Robin W
    Moderator

    @robin-w

    ok. You should not get an error when deactivating bbpress, so something is causing this outside of bbpress itself.

    You say you get a critical error – I need to know exactly what that says. You might need to turn n debug to get this.

    Wordpress doesn’t make this easy !!

    https://wpforms.com/developers/how-to-enable-debugging-in-wordpress/


    ollietubb1
    Participant

    @ollietubb1

    Hi Robin,
    Thanks for sticking with me here. I have error logs on the server so I tried again to disable bbpress and below is the log. I disabled and deleted Divi Mega Pro as I realised I didn’t use that in the end but it didn’t solve it.
    Let me know what you think.
    Thanks,
    Ollie

    [Wed Feb 02 08:22:26.842483 2022] [proxy_fcgi:error] [pid 3110766] [client 2a00:23c6:6f4f:d001:20eb:9d22:835a:c06c:0] AH01071: Got error ‘PHP message: PHP Warning: Undefined variable $force in /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-content/plugins/divi-mega-pro/class.divi-mega-pro.admin.core.php on line 208’, referer: https://wbc1.otiscreative.co.uk/wp-admin/plugins.php
    [Wed Feb 02 08:22:33.374828 2022] [proxy_fcgi:error] [pid 3109704] [client 2a00:23c6:6f4f:d001:20eb:9d22:835a:c06c:0] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Error: Call to undefined function is_bbpress() in /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-content/themes/Divi-Child-Theme/functions.php:28\nStack trace:\n#0 /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-includes/class-wp-hook.php(309): modify_body_classes()\n#1 /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-includes/plugin.php(189): WP_Hook->apply_filters()\n#2 /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-includes/post-template.php(836): apply_filters()\n#3 /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-includes/post-template.php(595): get_body_class()\n#4 /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-content/themes/Divi/header.php(29): body_class()\n#5 /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-includes/template.php(770): require_once(‘…’)\n#6 /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-includes/template.php(716): load_template()\n#7 /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-content/themes/Divi/in…’, referer: https://wbc1.otiscreative.co.uk/wp-admin/plugins.php?plugin_status=all&paged=1&s
    [Wed Feb 02 08:22:38.838643 2022] [proxy_fcgi:error] [pid 3133583] [client 2a00:23c6:6f4f:d001:20eb:9d22:835a:c06c:0] AH01071: Got error ‘PHP message: PHP Warning: Undefined variable $force in /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-content/plugins/divi-mega-pro/class.divi-mega-pro.admin.core.php on line 208’, referer: https://wbc1.otiscreative.co.uk/wp-admin/plugins.php?plugin_status=all&paged=1&s
    [Wed Feb 02 08:24:39.400052 2022] [proxy_fcgi:error] [pid 3109701] [client 2a00:23c6:6f4f:d001:20eb:9d22:835a:c06c:0] AH01071: Got error ‘PHP message: PHP Warning: Undefined variable $force in /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-content/plugins/divi-mega-pro/class.divi-mega-pro.admin.core.php on line 208’, referer: https://wbc1.otiscreative.co.uk/wp-admin/plugins.php
    [Wed Feb 02 08:25:12.226569 2022] [proxy_fcgi:error] [pid 3110766] [client 2a00:23c6:6f4f:d001:20eb:9d22:835a:c06c:0] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Error: Call to undefined function is_bbpress() in /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-content/themes/Divi-Child-Theme/functions.php:28\nStack trace:\n#0 /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-includes/class-wp-hook.php(309): modify_body_classes()\n#1 /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-includes/plugin.php(189): WP_Hook->apply_filters()\n#2 /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-includes/post-template.php(836): apply_filters()\n#3 /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-includes/post-template.php(595): get_body_class()\n#4 /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-content/themes/Divi/header.php(29): body_class()\n#5 /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-includes/template.php(770): require_once(‘…’)\n#6 /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-includes/template.php(716): load_template()\n#7 /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-content/themes/Divi/in…’


    Robin W
    Moderator

    @robin-w

    ok, it is a function in your child theme’s function file – line 28

    Call to undefined function is_bbpress() in /home/storm/sites/wbc1-otiscreative-co-uk/public/wp-content/themes/Divi-Child-Theme/functions.php:28

    So who had created that file? as either they or you will need to amend whatever that part of the file is trying to do.


    ollietubb1
    Participant

    @ollietubb1

    Great, thank you, I was suspecting this is the culprit but glad to hear from someone with clearly much more experience than me!

    I will take a look now and let you know how I get on.

    Thanks again,
    Ollie


    ollietubb1
    Participant

    @ollietubb1

    I think this is the problem? … don’t recall adding it but assume it is safe to remove as I am removing bbPress for now at least, what do you think?

    add_filter(‘body_class’, ‘modify_body_classes’, 20);

    function modify_body_classes( $classes ) {
    if( is_bbpress() ) {
    $remove_classes = array(‘et_right_sidebar’, ‘et_left_sidebar’, ‘et_includes_sidebar’);
    foreach( $classes as $key => $value ) {
    if ( in_array( $value, $remove_classes ) ) unset( $classes[$key] );
    }
    $classes[] = ‘et_full_width_page’;
    }
    return $classes;
    }


    ollietubb1
    Participant

    @ollietubb1

    It worked!

    Thanks so much for your help, I wouldn’t have got to this point without you ๐Ÿ™‚


    Robin W
    Moderator

    @robin-w

    Great – glad you are fixed ๐Ÿ™‚


    ollietubb1
    Participant

    @ollietubb1

    Thank you, and just one more question..

    Am I right in thinking I need bbPress for the forum part of BuddyPress?

    I am currently looking at using groups for topics but it is not quite the same.

    I’ll do some digging online as well but just wanted to ask your opinion.

    Many thanks,
    Ollie


    Robin W
    Moderator

    @robin-w

    bbpress is the forum part of buddypress.

    I don’t use buddypress on any of my sites – nothing wrong with it, but my sites are just forum based, and I use ‘bbp private groups’ (which I wrote ๐Ÿ™‚ ) to run separate forums where I need to.


    ollietubb1
    Participant

    @ollietubb1

    Okay, great work!

    So, do I need to install bbPress separately.I assumed perhaps wrongly that BuddyPress also is a forum?


    Robin W
    Moderator

    @robin-w

    as far as I know buddypress requires bbpress as a forum if you want your social network to have a forum.

    BBpress is just a forum, so if you want more than that, then you might need buddypress.


    ollietubb1
    Participant

    @ollietubb1

    Hello Robin,

    Me again! We have come back to bbPress as after testing BuddyPress the client has decided this is more effective for their purpose.

    Please can you let me know the best way to remove the sidebar from the forum pages? I found some old articles but nothing very recent. I am using DIVI theme if that helps.

    Here is the forum so far – https://wbc1.otiscreative.co.uk/forums/

    Many thanks,
    Ollie


    Robin W
    Moderator

    @robin-w

    that’s divi/theme related

    see item 8 here

    Step by step guide to setting up a bbPress forum – Part 1


    ollietubb1
    Participant

    @ollietubb1

    Thanks Robin, will take a look through the article.

    All the best,
    Ollie


    ollietubb1
    Participant

    @ollietubb1

    Hi Robin,

    It turns out the client would like the sidebar to show Tags, recent posts etc

    I have tried to set this up with widgets but it doesn’t show.

    I am concerned that bbPress won’t work with Divi Builder. I was hoping to create Divi templates for the forum so that i can keep the look the same as the rest of the site.

    I have a list of questions building up and wondered should I ask you or create new topics for each?

    Thank you,
    Ollie


    Robin W
    Moderator

    @robin-w

    sorry, since Divi is a paid product, and bbpress is a free one, suggest you refer to Divi and how to get the two working – Divi claim they integrate viz ‘bbPress should work seamlessly with all the best WordPress themes including Divi and Extra. As thereโ€™s no need to change themes to use it, bbPress is ideal for anyone starting a new website as well as those with an existing site theyโ€™d like to enhance with a discussion area.’

    How to Use bbPress to Add a Forum to Your WordPress Website

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