Support » Plugin: Autoptimize » script exclusion

  • Resolved frontiers

    (@frontiers)


    How can ask Autoptimize stay out of the way? I like Autoptimize but with new test seem have problem with the eventbrite script that run in my eventmanger.

    https://www.eventbrite.nl/platform/docs/embedded-checkout
    Load the script local. Did also try external but pop nor the embed will work when have autoptimize active. When I disabnle Autoptimize everthings works perfect.

    But there must be work around??

    Have these exclusions but would help with this version of AO.
    wp-includes/js/dist/, wp-includes/js/tinymce/, js/jquery/jquery.js/jquery-migrate.js,jquery.slim.min.js, /jquery/jquery.min.js, eb.widgets.js, eb_widgets.js

    Have not tested this before in last past months afther had working setting back then.

    Must be solution without getting rit of AO to make work togetter.

    • This topic was modified 9 months, 2 weeks ago by frontiers.
    • This topic was modified 9 months, 2 weeks ago by frontiers.

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

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

    (@optimizingmatters)

    OK, some questions:
    * does eventbrite work when “optimize JS” is off?
    * does eventbrite work when “optimize JS” is on but “aggregate JS” is off?
    * when it breaks, what JS errors do you see in the browser console?

    Thread Starter frontiers

    (@frontiers)

    * does eventbrite work when “optimize JS” is off? = YES
    * does eventbrite work when “optimize JS” is on but “aggregate JS” is off? = NO

    * when it breaks, what JS errors do you see in the browser console? Dont show up, not even see broken version.

    ?vhp_flush_do=all&_wpnonce=406d591cc5:336 Uncaught TypeError: Cannot read property ‘createWidget’ of undefined
    at ?vhp_flush_do=all&_wpnonce=406d591cc5:336
    (anonymous) @ ?vhp_flush_do=all&_wpnonce=406d591cc5:336
    autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:2 JQMIGRATE: Migrate is installed, version 3.3.2
    DevTools failed to load SourceMap: Could not load content for chrome-extension://gginmiamniniinhbipmknjiefidjlnob/include.postload.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
    4autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1 jQuery.Deferred exception: r is not a function TypeError: r is not a function
    at o (https://www.bekamhealing.com/wp-content/cache/autoptimize/js/autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1:31360) undefined
    bI.Deferred.exceptionHook @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1
    o @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1
    setTimeout (async)
    (anonymous) @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1
    p @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1
    fireWith @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1
    fire @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1
    p @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1
    fireWith @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1
    ready @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1
    setTimeout (async)
    (anonymous) @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1
    (anonymous) @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1
    (anonymous) @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1
    4autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1 jQuery.Deferred exception: r is not a function TypeError: r is not a function
    at o (https://www.bekamhealing.com/wp-content/cache/autoptimize/js/autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1:31360) undefined

    Thread Starter frontiers

    (@frontiers)

    * when it breaks, what JS errors do you see in the browser console? I myself Can hardly understand what it says. But dont think this any relation to the error.

    • This reply was modified 9 months, 2 weeks ago by frontiers.
    Thread Starter frontiers

    (@frontiers)

    https://www.bekamhealing.com/events/test-event/

    Its just test and sure way to make this work. Becouse when disbale AO. that moment starts working so somewhere I have a conflict but debuglog and PHP error log are clean without any notice.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Looks like you have that old “defer jQuery” code snippet running and I think things will work when you disable that frontiers, can you do so?

    Thread Starter frontiers

    (@frontiers)

    1. That old “defer jQuery” have looked for that many times. Got that there since started this website. But that not thing that I can solve myself, since snippet never been fount.

    2. Event checkout will not depend on JQuery.

    3. Pretty sure that not error since I notice that error but its for me labeled as unsolved and not anything that did try made it better.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I’m 100% sure the problem is just that, let me explain;

    When I disable AO (by adding ?ao_noptimize=1 to the URL), this is the linked JS-file that comes just before the inline eventbrite code which mentions window.EBWidgets.createWidget.

    <script src="https://www.bekamhealing.com/wp-content/themes/lodestar-wpcom/assets/js/eb.widgets.js"></script>

    But when AO is active, that becomes: <script defer src="https://www.bekamhealing.com/wp-content/cache/autoptimize/js/autoptimize_single_9f2c732faa0af87c7512a2aed4861441.js"></script>

    The problem specifically is with the defer, which AO does not add by itself.

    Now when looking for defer in the HTML source, I also see
    <script>var aoDeferInlineJQuery=function(){ which is something that _used_ to be added by the Critical CSS power-up (which as far as I can tell you are not using) or which could be added by something else somewhere somehow.

    So the only solution I can give you is; look where that deferring-code is added and stop that form happening frontiers.

    Thread Starter frontiers

    (@frontiers)

    Thanks that helpfull look in to!

    I searche for that issue

    Thread Starter frontiers

    (@frontiers)

    I now understand defer refrence also.

    Its solved! Thanks!!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

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

    groeten uit België,
    frank

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘script exclusion’ is closed to new replies.