• Resolved tuongta248

    (@tuongta248)


    Hi, I just installed the plugin recently, super happy with it, but I’m running into a problem where it show this in console log when I try to minify the javascript
    Uncaught TypeError: Cannot read property ‘html5’ of undefined
    at autoptimize_4effeaab88c91048eccad1b642b48e7c.js:18
    at autoptimize_4effeaab88c91048eccad1b642b48e7c.js:18
    at autoptimize_4effeaab88c91048eccad1b642b48e7c.js:18

    this is my autoptimize settings:
    Optimize JavaScript Code – checked
    Aggregate JS-files – checked
    Also aggregate inline JS -checked
    Exclude scripts from Autoptimize: seal.js, js/jquery/jquery.js

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

    (@optimizingmatters)

    Can you share your site’s URL so I can have a look at what is going wrong tuongta248 ?

    Thread Starter tuongta248

    (@tuongta248)

    It’s https://lccafe.com.au/
    Thank you for responding

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, can you try adding themes/kaffa/assets/js/modernizr-2.6.2.min.js and if that does not work themes/kaffa/assets/js/ in the comma-separated JS optimization exclusion list?

    Thread Starter tuongta248

    (@tuongta248)

    Both of them work, I can load the page now but the styles and some functionalities in the website is missing (menu, carousel dont work these two all use JS) and I got another error in the console.log:

    Uncaught ReferenceError: i is not defined
    at Plugin.initSlideshow (autoptimize_8d79e73a19ff6739eec2eaba2bb491d0.js:201)
    at Plugin.init (autoptimize_8d79e73a19ff6739eec2eaba2bb491d0.js:200)
    at new Plugin (autoptimize_8d79e73a19ff6739eec2eaba2bb491d0.js:196)
    at HTMLDivElement.<anonymous> (autoptimize_8d79e73a19ff6739eec2eaba2bb491d0.js:213)
    at Function.each (jquery.js:2)
    at n.fn.init.each (jquery.js:2)
    at n.fn.init.$.fn.<computed> [as zoomSlider] (autoptimize_8d79e73a19ff6739eec2eaba2bb491d0.js:213)
    at HTMLDivElement.<anonymous> (autoptimize_8d79e73a19ff6739eec2eaba2bb491d0.js:213)
    at Function.each (jquery.js:2)
    at n.fn.init.each (jquery.js:2)

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    For that try excluding plugins/lte-ext/elementor/shortcodes/zoomslider/jquery.zoomslider.js or if that doesn’t work plugins/lte-ext/elementor/ or if that doesn’t work plugins/lte-ext/?

    Thread Starter tuongta248

    (@tuongta248)

    added plugins/lte-ext/elementor/shortcodes/zoomslider/jquery.zoomslider.js and it all worked like a charm !!

    You’re a legend!

    Thank you very much ??

    Can you tell me how you navigate those files? I’ve got several websites, so I don’t want to bother you every single time haha ??

    • This reply was modified 4 years, 6 months ago by tuongta248.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Can you tell me how you navigate those files? I’ve got several websites, so I don’t want to bother you every single time haha

    well
    1. I look at the JS error (which you provided) and use a word (function name or variable) which (probably) uniquely identifies that piece of JS
    2. I open the site with AO disabled by adding ?ao_noptimize=1 to the URL
    3. I then open then developer tools in Firefox, go to the debugger tab and click ctrl-shift-f to search from the string in (1) to find the JS-file(s) that have those strings
    4. the files from (3) are the ones you can try excluding

    happy hunting ??

    frank

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Uncaught TypeError: Cannot read property ‘html5’ of undefined’ is closed to new replies.