Skip to:
Content
Pages
Categories
Search
Top
Bottom

Fatal errors for calls to undefined BP funcs after upgrading BP


  • adamt19
    Participant

    @adamt19

    I upgraded my version of budypress via admin and now calls to BP functions (such as bp_is_active) are causing fatal errors. I can’t access wp-admin and cant activate / deactivate BP via wp-cli either (simply returns the same error about fatal call to undefined bp functions.)

    If I wipe out my functions.php, there will be template files which call undefined functions. So I can’t really do that.

    What’s wrong with the ugprade process that seemingly disables buddypress? How do I fix this?

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

  • r-a-y
    Keymaster

    @r-a-y

    The problem is you are attempting to use BuddyPress functions when they do not exist during activation / reactivation in your theme’s functions.php or templates.

    When specifically relying on plugin functions, wrap those function calls with:

    if ( function_exists( 'THE_FUNCTION_YOU'RE_USING' ) ) {
         // YOUR CODE HERE
    }

    adamt19
    Participant

    @adamt19

    So this only matters if upgrading via wp-admin, because of a disable/re-enable routine? Had no problems deploying to other environments via git/sftp/ssh.

    Makes sense though. Will wrap to future proof this for later. Thx!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal errors for calls to undefined BP funcs after upgrading BP’ is closed to new replies.
Skip to toolbar