Support » Fixing WordPress » JavaScript not running on backend

  • Resolved muttleydosomething


    “The block editor requires JavaScript. Please enable JavaScript in your browser settings, or try the Classic Editor plugin.”

    Also every plugin that requires JavaScript gives an error message.

    I have seen many posts from people having this problem. Unfortunately the only response everyone gets is ‘disable your ad blocker’ I have disabled pi hole completely and still get this error.

    I have also tried every modern browser and still get this error.
    I have visited and get this reply:

    “Javascript is enabled in your web browser. If you disable JavaScript, this text will change.” I have successfully run Javascript demos from all over the net and everything runs perfectly.

    So far I have:
    Completely disabled my ad blocker
    Tried every major browser: Firefox, Chrome, Safari and Edge
    Tried on both Windows 10 and IOS
    Successfully run multiple Javascript demos from around the web on every browser

    The ONLY place that Javascript doesn’t run is on the back-end of all of my sites. The ‘Search’ function works just fine on the front-end.

    Having searched all the other related posts I couldn’t find anyone with a solution, time goes by and then the topic is closed with no one any better off.

    All I can think of is it must be my Web Server IIS 10 is somehow filtering scripts?

    Is there anyone who can actually help?? Many thanks 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator t-p


    Your browser can help you identify JavaScript issues or conflicts and this article can assist you in doing that diagnosis. This could help identify Visual Editor issues as well.

    Thread Starter muttleydosomething


    Thank you t-p for your terrific suggestion.
    Adding define(‘SCRIPT_DEBUG’, true); to wp-config.php helped Chrome find the following problem with JavaScript:

    Refused to execute inline script because it violates the following Content Security Policy directive: “script-src ‘self'”. Either the ‘unsafe-inline’ keyword, a hash (‘sha256-/YpbaZxLCFpfmU+h0cXYjk1fkxdbHfO5UXAKf7NKes8=’), or a nonce (‘nonce-…’) is required to enable inline execution.

    Along with many others…

    /wp-admin/plugins.php line 7 etc…

    There seems to be a problem with anything that even mentions
    <script type=”text/javascript”> etc…

    Is there a simple way you know of to fix this? Thanks again!

    Thread Starter muttleydosomething


    I have found that my problem was caused by my Web Server (IIS 10) In the HTTP Response Headers. Having Content-Security-Policy script-src ‘self’ was limiting the scripts that could run stopping the use of many plugins, including WordPress itself from working.

    Content-Security-Policy is worth looking further into!

    Thanks to t-p for pointing me in the right direction

    Thread Starter muttleydosomething



    Moderator t-p


    You are welcome 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘JavaScript not running on backend’ is closed to new replies.