• Hi all, this morning I discovered a compatibility issue of this plugin with wordpress 4.9.9. If I try to save a new page for example the following error is generated:

    PHP Fatal error:  Uncaught Error: Call to undefined function wp_is_json_request() 
    in /var/www/mysite.it.alfa4/wp-content/plugins/advanced-custom-fields/includes/l10n.php:34\n
    Stack trace:\n#0 /var/www/mysite.it.alfa4/wp-content/plugins/advanced-custom-fields/includes/l10n.php(67): determine_locale()\n
    #1 /var/www/mysite.it.alfa4/wp-content/plugins/advanced-custom-fields/includes/l10n.php(118): acf_get_locale()\n
    #2 /var/www/mysite.it.alfa4/wp-content/plugins/advanced-custom-fields/acf.php(253): acf_load_textdomain()\n
    #3 /var/www/mysite.it.alfa4/wp-includes/class-wp-hook.php(286): ACF->init('')\n
    #4 /var/www/mysite.it.alfa4/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)\n
    #5 /var/www/mysite.it.alfa4/wp-includes/plugin.php(453): WP_Hook->do_action(Array)\n
    #6 /var/www/mysite.it.alfa4/wp-settings.php(450): do_action('init')\n
    #7 /var/www/mysite.it.alfa4/wp-config.php(94): require_once('/var/www/ortige...')\n
    #8 /var/www/mysite.it.alfa4/wp-load.php(37): require_onc in /var/www/mysite.it.alfa4/wp-content/plugins/advanced-custom-fields/includes/l10n.php on line 34, 
    referer: https://www.mysite.it/wp-admin/post.php?post=4639&action=edit

    Temporary workaround is to add the function to my theme:

    function wp_is_json_request() {
        if ( isset( $_SERVER['HTTP_ACCEPT'] ) && false !== strpos( $_SERVER['HTTP_ACCEPT'], 'application/json' ) ) {
            return true;
        }
        if ( isset( $_SERVER['CONTENT_TYPE'] ) && 'application/json' === $_SERVER['CONTENT_TYPE'] ) {
            return true;
        }
        return false;
    }

    Hope this helps, Thanks.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Compatibility issue with 4.9.9’ is closed to new replies.