• Resolved willjames

    (@willjames)


    Using the noAO link the search filter on the right hand side works perfectly. With AO on all the sliders are missing. I tried the installing of the js migrate helper but this did not make any difference.
    In the console I get the following errors:

    
    Uncaught TypeError: $(...).slider is not a function
        at HTMLDocument.<anonymous> (VM3117 javascript;base64,dmFyIHN0bU9wdGlvbnNfY2FzdG1kYXNoeWVhcjsKICAgIChmdW5jdGlvbiAoJCkgewogICAgICAgICQoZG9jdW1lbnQpLnJlYWR5KGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdmFyIGFmZml4ID0gIiI7CiAgICAgICAgICAgIHZhciBzdG1NaW5WYWx1ZSA9IDA7CiAgICAgICAgICAgIHZhciBzdG1NYXhWYWx1ZSA9IDIwMjE7CiAgICAgICAgICAgIHN0bU9wdGlvbnNfY2FzdG1kYXNoeWVhciA9IHsKICAgICAgICAgICAgICAgIHJhbmdlOiB0cnVlLAogICAgICAgICAgICAgICAgbWluOiAwLAogICAgICAgICAgICAgICAgbWF4OiAyMDIxLAogICAgICAgICAgICAgICAgdmFsdWVzOiBbMCwgMjAyMV0sCiAgICAgICAgICAgICAgICBzdGVwOiAxMCwKICAgICAgICAgICAgICAgIHNsaWRlOiBmdW5jdGlvbiAoZXZlbnQsIHVpKSB7CiAgICAgICAgICAgICAgICAgICAgJCgiI3N0bV9maWx0ZXJfbWluX2NhLXllYXIiKS52YWwodWkudmFsdWVzWzBdKTsKICAgICAgICAgICAgICAgICAgICAkKCIjc3RtX2ZpbHRlcl9tYXhfY2EteWVhciIpLnZhbCh1aS52YWx1ZXNbMV0pOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHN0bVRleHQgPSB1aS52YWx1ZXNbMF0gKyBhZmZpeCArICcg4oCUICcgKyB1aS52YWx1ZXNbMV0gKyBhZmZpeDsKICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAkKCcuZmlsdGVyLWNhLXllYXIgLnN0bS1jdXJyZW50LXNsaWRlci1sYWJlbHMnKS5odG1sKHN0bVRleHQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9OwogICAgICAgICAgICAkKCIuc3RtLWNhLXllYXItcmFuZ2UiKS5zbGlkZXIoc3RtT3B0aW9uc19jYXN0bWRhc2h5ZWFyKTsKCgogICAgICAgICAgICAkKCIjc3RtX2ZpbHRlcl9taW5fY2EteWVhciIpLnZhbCgkKCIuc3RtLWNhLXllYXItcmFuZ2UiKS5zbGlkZXIoInZhbHVlcyIsIDApKTsKICAgICAgICAgICAgJCgiI3N0bV9maWx0ZXJfbWF4X2NhLXllYXIiKS52YWwoJCgiLnN0bS1jYS15ZWFyLXJhbmdlIikuc2xpZGVyKCJ2YWx1ZXMiLCAxKSk7CgogICAgICAgICAgICAkKCIjc3RtX2ZpbHRlcl9taW5fY2EteWVhciIpLmtleXVwKGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICQoIi5zdG0tY2EteWVhci1yYW5nZSIpLnNsaWRlcigidmFsdWVzIiwgMCwgJCh0aGlzKS52YWwoKSk7CiAgICAgICAgICAgIH0pOwoKICAgICAgICAgICAgJCgiI3N0bV9maWx0ZXJfbWluX2NhLXllYXIiKS5mb2N1c291dChmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICBpZiAoJCh0aGlzKS52YWwoKSA8IHN0bU1pblZhbHVlKSB7CiAgICAgICAgICAgICAgICAgICAgJCgiLnN0bS1jYS15ZWFyLXJhbmdlIikuc2xpZGVyKCJ2YWx1ZXMiLCAwLCBzdG1NaW5WYWx1ZSk7CiAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS52YWwoc3RtTWluVmFsdWUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICQoIiNzdG1fZmlsdGVyX21heF9jYS15ZWFyIikua2V5dXAoZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgJCgiLnN0bS1jYS15ZWFyLXJhbmdlIikuc2xpZGVyKCJ2YWx1ZXMiLCAxLCAkKHRoaXMpLnZhbCgpKTsKICAgICAgICAgICAgfSk7CgogICAgICAgICAgICAkKCIjc3RtX2ZpbHRlcl9tYXhfY2EteWVhciIpLmZvY3Vzb3V0KGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgIGlmICgkKHRoaXMpLnZhbCgpID4gc3RtTWF4VmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICAkKCIuc3RtLWNhLXllYXItcmFuZ2UiKS5zbGlkZXIoInZhbHVlcyIsIDEsIHN0bU1heFZhbHVlKTsKICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLnZhbChzdG1NYXhWYWx1ZSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgIH0pCiAgICB9KShqUXVlcnkpOw==:21)
        at i (VM3107 jquery.js:2)
        at Object.fireWith [as resolveWith] (VM3107 jquery.js:2)
        at ready (VM3107 jquery.js:2)
    

    I have tried the : ‘Add try-catch wrapping?’ and that made no difference?

    This is the important search page on the site and I don’t want to have to turn AO off…?
    Thanks for your help

    • This topic was modified 5 years, 9 months ago by Yui.
    • This topic was modified 5 years, 9 months ago by Yui. Reason: please use CODE button for code formatting

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

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

    (@optimizingmatters)

    hey Will;
    there were no changes in JS optimization in 2.7.7, so this is likely due to some other reasons.

    I checked the page and search seemed to be working for me, did you change anything?

    If the problem persists, first thing to try is to disable the “defer jQuery” advanced option on the critical CSS tab?

    hope this helps,
    frank

    Thread Starter willjames

    (@willjames)

    I have had to deactivate the ‘Aggregate JS files?’ as it was causing problems all over with my image carousel, search filter, maps display etc.

    I turned off the asset cleanup and it wasn’t that – the only time it works is without the ‘Aggregate JS files?’ turned on.
    Interestingly, it has not significantly impacted my page speed timings/scores?

    If you are around I can turn it back on but I don’t want to leave the site like that for long.

    Thanks for all your help

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    maybe try with “aggregate JS files” on and “defer jQuery” (critical css -> advanced) off?

    Thread Starter willjames

    (@willjames)

    I turned off the “defer jQuery” and turned the aggregate js back on – it broke again.

    Oddly when I put it back to the settings it still didn’t work, so I had to turn off the “defer jQuery” again and it worked. This may be a timing/cache issue, so I will try again shortly.

    The site is now working again. I am running an import so I can’t check the effect on page speed etc.

    Any ideas?

    Thanks

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    so now “aggregate JS files” is active and “defer jQuery” off? and in spite of the initial hiccup all now works?

    Thread Starter willjames

    (@willjames)

    An update.
    JS Aggregate only works when I have ‘Also aggregate inline JS?’ turned on. When this is off I get the JS problems regardless of whether the “defer jQuery” is on or off.

    So to answer your question above, that configuration does not work. “aggregate JS files” only works if ‘Also aggregate inline JS?’ is on.

    Why I turned this off was the size of the cache that kept growing and it wasn’t helping the page speed analysis much.

    So my current settings are:
    JS Aggregate: On
    ‘Also aggregate inline JS?’: On
    ‘defer jsquery’: On

    And I am functional, (albeit with a cache that will keep growing and I am not sure what to do about that)

    Thanks again

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    do you have a non-production version of the site where things are allowed to be broken so I can look into that?

    Thread Starter willjames

    (@willjames)

    I am struggling to recreate the error on https://dev.truckpages.co.uk- the only difference is it doesn’t have CCSS installed (as I was charged for it before)

    Thanks

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, that seems to confirm the issue is likely due to the “defer jQuery” option after all, as that is part of CCSS?

    Thread Starter willjames

    (@willjames)

    The settings I am using now seem to have me at a Google pagespeed of 96 and green circles all round for almost every page I tried. Either there is something wrong or I am going to stop fiddling…?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I would stop fiddling 😁

    Thread Starter willjames

    (@willjames)

    If only…

    When I unchecked the box that said, “Save aggregated script/CSS as static files?”

    It was rocket fast (hence the scores).

    BUT

    It wasn’t loading any of the CSS from AO

    So back to fiddling…

    And I can’t get a load of files to show an effective cache policy… including the AO ones (there are 16 to 20 in total) – mainly fonts that are served from both the cdn and the domain.

    Once I have sorted these then I will look at the large numbers of DOM elements (I assume 2500 is excessive by any measure)

    Thanks for your help

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, alternative to unchecking “serve as static” (which has AO serve the CSS & JS as .php files which some security solutions block) is configuring your webserver, see e.g. https://varvy.com/pagespeed/cache-control.html for more info.

    re. DOM elements; that’s very likely theme & pagebuilder cruft .. :-/

    Thread Starter willjames

    (@willjames)

    I have managed to replicate the issue on https://dev.truckpages.co.uk/trucks-for-sale/
    The settings are to not aggregate inline css

    Thanks

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    hmm, the search seems to work for me Will, but I am seeing some ugly jQuery is not defined errors, so you’ll probably have to (re-)exclude js/jquery/jquery.js from JS optimization?

Viewing 15 replies - 1 through 15 (of 25 total)

The topic ‘After Update AO causing issues’ is closed to new replies.