• Resolved Cheryl

    (@tricheryltops)


    Hello,
    Several months ago, I finally found the right cocktail of Async Javascript,Autoptimize,WPRocket, and Critical CSS to speed up my site as much as possible without breaking it. Whew!

    Today, however, I have another issue. The Divi builder will not load. I am getting timeouts. I have changed NO settings in Autoptimize except for testing and then changing them back and I have also optimize for logged in users unchecked.

    I am sure this is an Autoptimize issue as when I temporarily disable autoptimize, the problem is solved.

    I moved my website to cloud hosting very recently but the builder was working fine until this morning, however, the problem seemed to occur before I updated the theme because I pulled back to a previous version of the theme and was still having the issue.

    In Autoptimize I have js/jquery/jquery.js excluded optimize Javascript checked, aggregate JS checked, aggregate inline JS unchecked as it was making the cache size grow quickly, CSS optimization is all checked except for aggregate inline css and inline all CSS and I’m using the critical CSS powerup (which I note that ALL rules disappeared when I moved the site). HTML code is optimized. And I have Save aggregated script/css as static files? checked.

    In Async Javascript I have it enabled async method set to defer jquery excluded, and autoptimize support turned OFF. The above settings worked well until today. If I turn autoptimize support on it breaks some of the Divi builder modules and if I exclude my theme and child theme in theme exclusions all content disappears for some posts/pages that were created with builder modules. If I don’t exclude that it works fine.

    I don’t want to stop using autoptimize and I can work around this for just a bit by going into “Safe Mode” if I want to use the Divi builder…but it would be nice to solve this problem which occurred just today.

    Any ideas?

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

Viewing 11 replies - 16 through 26 (of 26 total)
  • Thread Starter Cheryl

    (@tricheryltops)

    OK, here’s a link to the page source from a random test page with the noptimize filter set on (noptimize in the URL). In this case, the builder loads:

    https://gist.github.com/cherylcheryl/3f28ab46e1d8a8b79ccbc67eda7a0cb5

    And here’s a link to the page source from the same page without noptimize in the URL (in this case the builder times out and will not load):

    https://gist.github.com/cherylcheryl/010464d5eb2bb97cb4cc436b9e4410a9

    Thanks.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    hm … can you try adapting your noptimize script to look for the PageSpeed string (and noptimize if found) Cheryl?

    Thread Starter Cheryl

    (@tricheryltops)

    Hmmm…I have only a very vague idea of how I might go about that and I’m worried I end up spending a long time on it and breaking stuff ??
    Cheryl

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, this code snippet should do it;

    // Disable autoptimize on pages with the word “pagespeed” in the URL
    add_filter(‘autoptimize_filter_noptimize’,’pagespeed_noptimize’,10,0);
    function pagespeed_noptimize() {
        if (strpos($_SERVER[‘REQUEST_URI’],’PageSpeed’)!==false) {
            return true;
        } else {
            return false;
        }
    }
    Thread Starter Cheryl

    (@tricheryltops)

    This works:

    // Disable autoptimize on pages with the word "PageSpeed" in the URL
    add_filter('autoptimize_filter_noptimize','pagespeed_noptimize',10,0);
    function pagespeed_noptimize() {
    if (strpos($_SERVER['REQUEST_URI'],'PageSpeed')!==false) {
    return true;
    } else {
    return false;
    }
    }

    And allows the builder to load. However, it only works when I remover the other, similar, filter to disable autoptimize on pages that have the word “noptimize” in the URL. What’s the solution here — is there a way to filter multiple terms or do I need to change any “noptimize” I have in specific URLS to PageSpeed?
    Thanks
    Cheryl

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I’ll do you one better; I just committed a change to what will become AO 2.6 (eta end of this year) to honor PageSpeed=off so no extra code needed! It would be great if you could download AO 2.6 beta here and test this change? ??

    Thread Starter Cheryl

    (@tricheryltops)

    OK, I installed the beta plugin and it seems to be working so far. I removed the existing filter from functions.php and pages (at least ones that I’ve looked at) that I had previously “noptimized” seem to be working and the builder is loading.

    Will I still need to add a tag to the URL of pages I don’t wish to optimize?
    Thanks
    Cheryl

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    thanks for testing/ confirming!

    Will I still need to add a tag to the URL of pages I don’t wish to optimize?

    well, the fix is specifcally for the “builder” issues, if you use that noptimize-trick for other purposes as well, you would want to keep that one (but not the pagespeed one) in your functions.php

    frank

    Thread Starter Cheryl

    (@tricheryltops)

    OK, I initially removed the extra filter because it seemed that a page with a form which previously wouldn’t work if it had autoptimize on now wasn’t loading some of the form fields while the noptimize filter was in place…and was doing so without it.

    But I’ve tried again and it is showing the fields…I think it was likely just that I had to purge my cache a few times:)

    Thank you so much for your help — you’re awesome! I’ll keep an eye on how its going with the update.
    Cheryl

    Thread Starter Cheryl

    (@tricheryltops)

    Wait!
    Too early in the morning, I guess and I’m not thinking straight yet:)

    The other reason that I removed the noptimize filter last night is that the builder does not load if it’s in place. With the updated plugin, the builder now will load. However, if I have an additional filter in place in functions.php, the builder will not load.

    For now, it does seem like the pages that I “noptimized” previously are working now, though I’ll have to check them all.

    I’ll just keep the additional filter out for now unless I find something’s not working right.

    Again, thanks for your help!
    Cheryl

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you’re welcome Cheryl, feel free to leave a review of the plugin and support here! ??

    have a nice day!
    frank

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘Previously working now won’t let Divi builder load’ is closed to new replies.