• Resolved jasonbear

    (@jasonbear)


    Hello, Frank.

    I updated to Divi 4.13 today. Javascript stopped working on the front end (YIKES!), but remained perfectly functional on the back end when logged in.

    After hours of troubleshooting, system restores from backup, and process-of-elimination testing, I was finally able to identify the problem . . . at least partially. When I turn on the “Add try-catch wrapping” option in Autoptimize, all javascript works perfectly again on the front end. I have used Autoptimize with Divi for YEARS and have never had to turn on “try-catch wrapping.”

    Also, everything is fine when I revert to Divi 4.12.1. Therefore, Autoptimize is probably not the “culprit,” but I want to let you know about it. Is this something that you can remedy from your end, or do we have to yell at the Divi guys? I suppose that you’d probably have to study the new code in Divi 4.13 to know for sure. Have you heard of anybody else having a similar problem after updating to Divi 4.13?

    • This topic was modified 3 years ago by jasonbear.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    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

    Thread Starter jasonbear

    (@jasonbear)

    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)
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, do you have jQuery autoptimized or asynced/ deferred? what happens when you do not optimize/ async/ defer jQuery?

    Thread Starter jasonbear

    (@jasonbear)

    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.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    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?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    any news jasonbear ?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    No feedback so I assume this got resolved Jason? Feel free to follow up if you still encounter issues!

    have a nice day!
    frank

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Divi 4.13 update vs. Autoptimize’ is closed to new replies.