Yelling at ET is always permitted and while at it tell them they should stop clearing AO’s cache after a post edit 😉
But the most efficient way of dealing with this will be to troubleshoot;
1. what JS error is visible on the browser console when “add try/catch wrapping” is not active?
2. does the problem “go away” when you switch to “don’t aggregate but defer JS”? do you still see JS errors on the browser console?
3. does the problem “go away” when adding wp-content/themes to the JS opt. exclusion list, do you still see JS errors on the browser console?
4. when JS opt. is entirely off, do you still see JS errors on the browser console?
frank
Thanks for the quick response, Frank!
1. What JS error is visible on the browser console when “add try/catch wrapping” is not active?
–
ANSWER:
[Error] TypeError: null is not an object (evaluating 'handle.parentNode')
(anonymous function) (autoptimize_cc6ab08ffa0789dbbffdfad0652d18ae.js:7:209)
Global Code (autoptimize_cc6ab08ffa0789dbbffdfad0652d18ae.js:7:444)
2. Does the problem “go away” when you switch to “don’t aggregate but defer JS”? do you still see JS errors on the browser console?
–
ANSWER:
The problem goes away, except that my promo bar at the top of the page is gone. Here are the errors:
[Error] ReferenceError: Can't find variable: jQuery
o (www.-----.com:1:199097)
elegantPromo (www.-----.com:1:199971)
Global Code (www.-----.com:1:200004)
[Error] ReferenceError: Can't find variable: jQuery
Global Code (www.-----.com:1:200402)
[Error] ReferenceError: Can't find variable: jQuery
Global Code (www.-----.com:11)
[Error] ReferenceError: Can't find variable: jQuery
Global Code (www.-----.com:11)
[Error] TypeError: null is not an object (evaluating 'handle.parentNode')
(anonymous function) (www.-----.com:31)
Global Code (www.-----.com:41)
3. Does the problem “go away” when adding wp-content/themes to the JS opt. exclusion list, do you still see JS errors on the browser console?
–
ANSWER:
When I add “wp-content/themes” to the “Exclude scripts from Autoptimize” list, javascript works again, but much of the page content is missing.
[Error] TypeError: null is not an object (evaluating 'handle.parentNode')
(anonymous function) (autoptimize_408f47fb0a188ffa72dbd19a6d3008b8.js:7:209)
Global Code (autoptimize_408f47fb0a188ffa72dbd19a6d3008b8.js:7:444)
4. When JS opt. is entirely off, do you still see JS errors on the browser console?
–
ANSWER:
Yes, there are still errors. Also, my promo bar at the top of the page is gone and a couple of minor javascript things don’t work.
[Error] ReferenceError: Can't find variable: jQuery
o (www.-----.com:1:199097)
elegantPromo (www.-----.com:1:199971)
Global Code (www.-----.com:1:200004)
[Error] ReferenceError: Can't find variable: jQuery
Global Code (www.-----.com:1:200402)
[Error] ReferenceError: Can't find variable: jQuery
Global Code (www.-----.com:11)
[Error] ReferenceError: Can't find variable: jQuery
Global Code (www.-----.com:11)
[Error] TypeError: null is not an object (evaluating 'handle.parentNode')
(anonymous function) (www.-----.com:31)
Global Code (www.-----.com:41)
OK, do you have jQuery autoptimized or asynced/ deferred? what happens when you do not optimize/ async/ defer jQuery?
I have always kept jQuery excluded in the “Exclude scripts from Autoptimize” list. That is still the case. To my knowledge, I do not have jQuery set to async or defer.
I do pay for the Critical CSS plugin, if that matters.
hmmm, the fact you have errors even when JS opt is on is most worrisome. can you share your site’s URL so I can have a look at the HTML source & browser console output?
No feedback so I assume this got resolved Jason? Feel free to follow up if you still encounter issues!
have a nice day!
frank