• Resolved Annemarie

    (@tat2d)


    Hello, I’m trying to speed up a client’s site, so I installed Autoptimize. When I enable the options, it breaks the slider. We have some exceptions listed in the JavaScript field so the slider works, but it breaks the dropdown menus. Here are the errors we get with the JS option enabled (Ignore the Google one):

    (index):9 Uncaught TypeError: Object.merge is not a function
    at (index):9
    (anonymous) @ (index):9
    (index):13 Uncaught TypeError: window.addEvent is not a function
    at (index):13
    (anonymous) @ (index):13
    (index):15 Uncaught TypeError: window.addEvent is not a function
    at (index):15
    (anonymous) @ (index):15
    (index):7 GET https://www.googletagmanager.com/gtm.js?id=GTM-MMBGLQD net::ERR_ABORTED
    (anonymous) @ (index):7
    (anonymous) @ (index):8
    autoptimize_ca20b3f4c416a5b1cf389d5809ddafbd.js:689 Uncaught SyntaxError: Invalid regular expression flags

    I’m not sure how to fix the dropdowns or speed up the site without the JS options enabled. Can you help?

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

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

    (@optimizingmatters)

    Evening @tat2d;
    Can you try adding plugins/wp_roksprocket/assets/js/ to the comma-separated JS optimization exclusion list?

    frank

    Thread Starter Annemarie

    (@tat2d)

    Thank you for your reply. I added that but it’s still not working.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, what JS errors do you see on the browser console now?

    Thread Starter Annemarie

    (@tat2d)

    Sorry about that,

    http://www.googletagmanager.com/gtm.js?id=GTM-MMBGLQD Failed to load resource: the server responded with a status of 404 ()
    autoptimize_672fa78b7d1e28708f761e7cd260a827.js:684 Uncaught SyntaxError: Invalid regular expression flags
    biblestudymedia.com/:14 Uncaught TypeError: RokSprocket.Slideshow is not a constructor
    at biblestudymedia.com/:14
    at mootools.js:376
    at Array.forEach (<anonymous>)
    at Function.forEach (mootools.js:33)
    at Array.each (mootools.js:40)
    at fireEvent (mootools.js:375)
    at HTMLDocument.r (mootools.js:515)

    The Google error is there no matter what, so unless that’s part of the problem, you can ignore it.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    the Invalid regular expression flags is somewhat more difficult to identify so I’ll need to see that “live” somehow, but for the 2nd one you’ll also need to exclude plugins/wp_roksprocket/layouts/features/themes/slideshow/slideshow.js.

    Thread Starter Annemarie

    (@tat2d)

    I can send you login information to “break it” to see it. I just can’t leave it broken since they receive a lot of traffic. Where can I send the information?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I afraid I don’t log into other people’s site in the context of support here @tad2d, esp. not on high-traffic sites. Do you have a non-prod system where you can leave things in a broken state?

    Thread Starter Annemarie

    (@tat2d)

    Let me create one. I’ll reply shortly

    Thread Starter Annemarie

    (@tat2d)

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, for the “regular expression flags”-error you’ll need to exclude plugins/gantry5/assets/js/main.js from optimization, can you try that?

    Thread Starter Annemarie

    (@tat2d)

    That worked, thank you so much!

    Thread Starter Annemarie

    (@tat2d)

    For anyone else with the same issues, here’s what I’m excluding:

    seal.js, js/jquery/jquery.js, revslider/public/assets/js, plugins/wp_roksprocket/assets/js, plugins/wp_roksprocket/layouts/features/themes/slideshow/slideshow.js, plugins/gantry5/assets/js/main.js

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Checking JavaScript Options breaks menu dropdown’ is closed to new replies.