• 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 10 replies - 16 through 25 (of 25 total)
  • Thread Starter willjames

    (@willjames)

    That first one is a test truck – ignore the text in the field.

    The part that is missing is the sliders under the drop downs on the left hand search filter

    Thread Starter willjames

    (@willjames)

    I think my biggest issue it that there are still no cache control/expire headers set on the live site for Autoptimize css and js. could this be that I have the instruction in the main .htaccess file that does not match the instruction in the AO .htaccess file?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, re sliders can you try excluding js/jquery/jquery.js from JS optimization?

    re. cache control; I do see correct caching headers, so should be OK?

    Thread Starter willjames

    (@willjames)

    The cache control oddly works on the dev site for the css but not on the live…?

    I have been through all settings to compare and the only 2 differences are CCSS and CDN on the live site.

    Tried to put that in the exclude then take off the ‘Also aggregate inline JS?’ and the site broke.

    Thanks

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    re. cache control: you’ll have to look into your CDN Settings in that case (CCSS has not impact there)

    re. exclusion; how did your site break, what happened on the screen and what JS errors did you see?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    any news willjames ?

    Thread Starter willjames

    (@willjames)

    Apologies I have been taken off onto other things temporarily. I will be on this when I return in a few days.

    It is still an issue.

    https://cdn.truckpages.co.uk/wp-content/cache/autoptimize/css/autoptimize_6e849aad694dc37782171e1c87a37a73.css

    Has inks to (amongst other fonts) ;src:url(//www.truckpages.co.uk/wp-content/themes/motors-truckpages/assets/css/../fonts/service-fonts/stm-service-default.eot?vcgqsx)

    These should not appear, they should be all from the cdn (it downloads the same fonts from the cdm earlier in the process so this is just a waste of resource).

    I can’t see where the AO file is getting its instruction to show these fonts like this? I have been through all the css files with AO turned off and I see no reference to the domain?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    AO by default does not put fonts on a CDN to avoid CORS issues, but you can tell AO to do so with this code snippet;

    
    add_filter('autoptimize_filter_css_fonts_cdn','__return_true');
    Thread Starter willjames

    (@willjames)

    Bit of a novice… Where would the snippet go?
    Thanks

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    The easiest & safest solution is using the code snippets plugin.

Viewing 10 replies - 16 through 25 (of 25 total)

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