Support

Account

Home Forums Bug Reports ACF fatal error on bbPress topic functions

Solved

ACF fatal error on bbPress topic functions

  • ACF version 5.4

    Fatal error: Call to undefined function get_current_screen() in …/wp-content/plugins/advanced-custom-fields-pro/api/api-helpers.php on line 3307

    I get this when performing bbPress topic admin functions such as edit, close, trash, spam… bbPress will complete the action but the current screen will not refresh, just the error message. No error with ACF deactivated.

  • This works:

    function acf_is_screen( $id = '' ) {
    	
       // vars
       global $current_screen; // instead of $current_screen = get_current_screen();
    
       // bail early if no screen
       if( !$current_screen ) return false;
    
       // return
       return ($id === $current_screen->id);
    	
    }

    Can I filter that somehow, to change the variable?

  • More info: the error occurs running the Twenty Sixteen theme 1.2 (current) and only ACF 5.4.0 (current) and bbPress 2.5.10 (current) plugins activated, no template mods on bbPress.

  • Hi guys

    Just released 5.4.1 with a fix for this issue!

  • A one line fix! Thanks, Elliot.

  • If it came down to choice between bbPress and ACF I’m going ACF all the way 🙂

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘ACF fatal error on bbPress topic functions’ is closed to new replies.