• Hi guys,

    for days now I haven’t been able to use the “add media” button in my wordpress installation’s editor (3.9.1). When I press it, nothing happens. I read in the forums that quite a few people came across this error and tried the suggestions given there.

    What I did:

    – deactivated all plug-ins
    – activated the wordpress default theme
    – deleted my browser’s cache
    – tried to use the button with three different browsers: Chrome, Firefox and Opera (newest versions)
    – double-checked that javascript is activated in all the browsers

    The console reads:

    Uncaught EvalError: Refused to evaluate a string as JavaScript because ‘unsafe-eval’ is not an allowed source of script in the following Content Security Policy directive: “script-src ‘unsafe-inline’ ‘self'”.

    and:

    Uncaught TypeError: Cannot read property ‘hasClass’ of undefined

    Any suggestions what could be the problem? Help? 🙁 Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Have you tried:

    resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    – re-uploading all files & folders – except the wp-content folder and wp-config.php & root .htaccess files – from a fresh download of WordPress. Make sure that you delete the old copies of files & folder before uploading the new ones.

    Thread Starter Noinda

    (@noinda)

    I am quite sure that the error is caused by WordPress’ usage of JavaScript function “eval()” — which I am told is completely unneccessary.

    Any chance “eval()” gets removed from uploading in the next version?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘"Add Media" Button not working – Javascript error’ is closed to new replies.