• ezp

    (@ezp)


    On all WP dashboards, I am receiving the following error in the console:

    Uncaught TypeError: x.getResponseHEADer is not a function

    This is thrown by all php files in the wp-admin folder. Specifically, it is thrown by this code block:

    var testCompression = {
    get : function(test) {
    var x;
    if ( window.XMLHttpRequest ) {
    x = new XMLHttpRequest();
    } else {
    try{x=new ActiveXObject(‘Msxml2.XMLHTTP’);}catch(e){try{x=new ActiveXObject(‘Microsoft.XMLHTTP’);}catch(e){};}
    }

    if (x) {
    x.onreadystatechange = function() {
    var r, h;
    if ( x.readyState == 4 ) {
    r = x.responseText.substr(0, 18);

      h = x.getResponseHEADer

    (‘Content-Encoding’);
    testCompression.check(r, h, test);
    }
    };

    x.open(‘GET’, ajaxurl + ‘?action=wp-compression-test&test=’+test+’&_ajax_nonce=’+compressionNonce+’&’+(new Date()).getTime(), true);
    x.send(”);
    }
    },

    check : function(r, h, test) {
    if ( ! r && ! test )
    this.get(1);

    if ( 1 == test ) {
    if ( h && ( h.match(/deflate/i) || h.match(/gzip/i) ) )
    this.get(‘no’);
    else
    this.get(2);

    return;
    }

    if ( 2 == test ) {
    if ( ‘”wpCompressionTest’ == r )
    this.get(‘yes’);
    else
    this.get(‘no’);
    }
    }
    };

    Is there an easy way to go about resolving this? Any insight as to the possible root cause of the issue?

Viewing 1 replies (of 1 total)
  • Moderator James Huff

    (@macmanx)

    This may be a plugin or theme conflict. Please attempt to disable all plugins, and switch to the default Twenty Twenty theme. If the problem goes away, enable them one by one to identify the source of the problem.

    If you can install plugins, install Health Check. On the troubleshooting tab, you can click the button to disable all plugins and change the theme for you, while you’re still logged in, without affecting normal visitors to your site.

Viewing 1 replies (of 1 total)
  • The topic ‘Uncaught TypeError: x.getResponseHEADer is not a function’ is closed to new replies.