Forum Replies Created
-
AuthorPosts
-
August 25, 2021 at 1:47 pm in reply to: Content Security Policy without using 'unsafe-inlne' #1318288
If you inspect the page and go to the Console tab it will show you all of the scripts that are failing to load, at the end of each error message Chrome gives you the hash you need to add to the CSP for each script that is failing.
August 25, 2021 at 11:04 am in reply to: Content Security Policy without using 'unsafe-inlne' #1318258Thanks for your responses
Yes it appears that unsafe-inline scripts are required for WordPress itself to work, tried a fresh install of WordPress with both the classic editor and Gutenberg and both fail to load the page builders, unfortunately our info-security team won’t allow the site to have these “unsafe-inline” elements due to the security risks.
I have managed to work around the issue by declaring a hash (sha256-XYZ) for each of the inline scripts that are required for the front end to work and repeating all of the inline styling that the theme uses in the child theme CSS file.
While this works for the front end, WordPress and the Enfold Theme builder use far too many inline scripts to declare each of them for the back end (think I counted around 90 on one page), luckily we have hosting with a staging environment so I am currently running the staging environment with the Content Security Policy commented out in the .htaccess file, so the site is usable and the backend can be accessed and all edits made to this environment, then when I deploy to live I activate the security policy so that the public facing site is secure and free of unsafe-inline scripts and styles.
April 9, 2019 at 6:10 pm in reply to: Icon List custom colours not working when using more than one instance of a list #1088767That fixed it, Thanks
July 1, 2016 at 9:55 pm in reply to: JavaScript errors when upgrading to Enfold 3.6.1 and to WordPress 4.5.2 #655919OK so I have found the culprit! The WP Super Cache plugin was causing the issues. Now deactivated. All is once again harmonious in the chaotic world of website development!
July 1, 2016 at 8:16 pm in reply to: JavaScript errors when upgrading to Enfold 3.6.1 and to WordPress 4.5.2 #655906Alternatively is there some code you can supply me that might fix the JavaScript errors which I believe are causing the issues:
Uncaught SyntaxError: Unexpected identifier | avia.js:1918
Uncaught SyntaxError: Unexpected string | shortcodes.js:572July 1, 2016 at 8:14 pm in reply to: JavaScript errors when upgrading to Enfold 3.6.1 and to WordPress 4.5.2 #655905Hi Vinay,
Thanks for getting back to me so quick.
I have followed your instructions and executed a hard refresh.
Unfortunately the issues prevail.
Which type of login details do you require? Access to the server via FTP or WordPress Admin?
Darrell
Thanks Yigit,
……and a quick response :)
I have modified custom.css, custom.js, functions.php in the enfold parent theme.
That link is useful, I now feel more confident with switching to a child theme.
Darrell
-
AuthorPosts