• Resolved stevewest15

    (@stevewest15)


    Autoptimize version: 2.2.2
    Divi Theme version: 3.0.67
    WordPress version: 4.8.1

    Hi,

    I need some assisting to troubleshoot a conflict between Autoptimize and Divi theme.

    We don’t use the new Divi theme “Minify And Combine Javascript Files” option (as that only minifies and combines Divi assets) but rather we use Autoptimize (as that has worked well in the past several years for our website with Divi and our various plugins).

    For troubleshooting purposes, on the above DEV site url I provided, I only have Divi theme and Autoptimize plugin activated. If you visit the home page, you’ll notice that the animation (like bring photo left-to-right, circle counters, etc) don’t work. If I disable Autoptimize “JavaScript Options”, the site loads fine.

    My question is how do I troubleshoot this issue further if there are no errors printed to browser console? See this screenshot for more info: https://www.screencast.com/t/4WZpjbpp

    Thank you for your assistance.

    SW

    • This topic was modified 7 years, 3 months ago by stevewest15.
    • This topic was modified 7 years, 3 months ago by stevewest15.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Hey @stevewest15;
    I don’t know if you changed anything, but I tested in FF & Chrome and in both I did see that circle counter?

    frank

    Thread Starter stevewest15

    (@stevewest15)

    Hi Frank,

    Thanks for checking! I didn’t change anything. It wasn’t working before on both MS Edge and Chrome. I now see it working on Chrome but the issue is inconsistent. On the LIVE site, the issue reappears without any changes happening on the site.

    Here is a screencast of the issue still present in MS Edge: https://www.screencast.com/t/nhjbAMScnNGX

    Can the AO re-organize the order of files being minified and combined? I’m wondering if that is why we see the issue sometimes while not at other times.

    Thanks,

    SW

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    The screencast requires Flash, which I don’t have @stevewest15

    Can the AO re-organize the order of files being minified and combined?

    for JS: no, it keeps order as found in HTML (although obviously if you exclude JS the order is changed somewhat).

    for CSS: no, except that AO honours the media-attribute in linked CSS, so if you have:

    1.css with media=screen
    2.css with media=all
    3.css with media=screen

    the result will be:

    ao1.css with media=screen (with 1.css and 3.css)
    ao2.css with media=all (with 2.css)

    But that will always be the same, so if the problem inconsistent then this is not the issue at hand.

    The circle counter JS is in themes/Divi/includes/builder/scripts/frontend-builder-scripts.js, maybe try excluding that? and if that doesn’t work try excluding themes/Divi/includes/builder/scripts/ entirely?

    You could also try removing the “defer”-flag (or switch to “async”) on the Autoptimized JS (given the inconsistency it might be related to the fact the AO’ed JS is loaded _very_ late) by using this code snippet:

    
    add_filter('autoptimize_filter_js_defer','sw_override_defer',10,1);
    function sw_override_defer($defer) {
    	return " ";
    }
    Thread Starter stevewest15

    (@stevewest15)

    Thank you so much! That function seems to have fixed the issue. I’ll continue to do some additional cross-browser compatibility testing to ensure no other issues.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    super! now to be clear; ideally from performance point-of-view the JS is either defer’ed or async’ed, so maybe try with return " async"; instead.

    have a nice weekend,
    frank

    Hello there.

    I had the same issue with the Divi’s blurb icons animations and the counters, but I had it only on MS Edge (it’s strange that I haven’t had any issues on IE7). That little function did the trick for me, though.

    I should mention that “async” doesn’t work, only without any flag return: " "; works.

    Thank you for the fix.

    • This reply was modified 7 years, 3 months ago by Ovidiu Zeicu.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Autoptimize & Divi Issue: Divi Animation Stops Working’ is closed to new replies.