• Resolved pustiu314p

    (@pustiu314p)


    Hi,
    I have the following error on my product pages – chrome console.

    autoptimize_78116ca0d4be12970ddc8ca9c3896a76.js:187 Uncaught ReferenceError: product_id is not defined
        at HTMLFormElement.<anonymous> (autoptimize_78116ca0d4be12970ddc8ca9c3896a76.js:187)
        at HTMLFormElement.dispatch (jquery.js:3)
        at HTMLFormElement.r.handle (jquery.js:3)
        at Object.trigger (jquery.js:3)
        at HTMLInputElement.<anonymous> (jquery.js:3)
        at Function.each (jquery.js:2)
        at n.fn.init.each (jquery.js:2)
        at n.fn.init.trigger (jquery.js:3)
        at HTMLInputElement.<anonymous> (autoptimize_78116ca0d4be12970ddc8ca9c3896a76.js:187)
        at HTMLFormElement.dispatch (jquery.js:3)
    (anonymous) @ autoptimize_78116ca0d4be12970ddc8ca9c3896a76.js:187
    dispatch @ jquery.js:3
    r.handle @ jquery.js:3
    trigger @ jquery.js:3
    (anonymous) @ jquery.js:3
    each @ jquery.js:2
    each @ jquery.js:2
    trigger @ jquery.js:3
    (anonymous) @ autoptimize_78116ca0d4be12970ddc8ca9c3896a76.js:187
    dispatch @ jquery.js:3
    r.handle @ jquery.js:3
    trigger @ jquery.js:3
    (anonymous) @ jquery.js:3
    each @ jquery.js:2
    each @ jquery.js:2
    trigger @ jquery.js:3
    n.fn.<computed> @ jquery.js:4
    init @ autoptimize_78116ca0d4be12970ddc8ca9c3896a76.js:187
    (anonymous) @ autoptimize_78116ca0d4be12970ddc8ca9c3896a76.js:187
    each @ jquery.js:2
    each @ jquery.js:2
    (anonymous) @ autoptimize_78116ca0d4be12970ddc8ca9c3896a76.js:187
    i @ jquery.js:2
    fireWith @ jquery.js:2
    ready @ jquery.js:2
    J @ jquery.js:2

    on “Exclude scripts from Autoptimize:” I have “wp-includes/js/dist/, wp-includes/js/tinymce/ , js/jquery/jquery.js, kirki/modules/webfont-loader/vendor-typekit/webfontloader.js, wp-includes/js/dist/i18n.min.js”

    Any idea how can I fix it?
    Thanks.

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

    (@optimizingmatters)

    Can you share the URL so I can take a look at the HTML & JS code pustiu314p?

    Thread Starter pustiu314p

    (@pustiu314p)

    Shure, Here it is: https://bit.ly/2HGMjWn

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

    (@optimizingmatters)

    OK, can you try adding woocommerce/assets/js/frontend/add-to-cart-variation.min.js to the comma-separated JS optimization exclusion list?

    Thread Starter pustiu314p

    (@pustiu314p)

    I just added it and the issue is still there.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, now also add plugins/woocommerce-product-addons/assets/js/addons.min.js ?

    Thread Starter pustiu314p

    (@pustiu314p)

    Yes, now is ok.

    Please let me know if I need to keep all these: wp-includes/js/dist/, wp-includes/js/tinymce/ , js/jquery/jquery.js, kirki/modules/webfont-loader/vendor-typekit/webfontloader.js, wp-includes/js/dist/i18n.min.js, woocommerce/assets/js/frontend/add-to-cart-variation.min.js, plugins/woocommerce-product-addons/assets/js/addons.min.js or some of them could be safely removed?

    Thank you.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    wp-includes/js/dist/, wp-includes/js/tinymce/ , js/jquery/jquery.js are the default exclusions

    kirki/modules/webfont-loader/vendor-typekit/webfontloader.js, wp-includes/js/dist/i18n.min.js were likely added by you or a developer earlier

    woocommerce/assets/js/frontend/add-to-cart-variation.min.js, plugins/woocommerce-product-addons/assets/js/addons.min.js are our latest additions, based on this discussion.

    but it’s almost impossible for me to say which ones could be removed, if you would want to do so you will have to do “trial & error”, removing one and testing (thoroughly) and re-adding if anything broke?

    Thread Starter pustiu314p

    (@pustiu314p)

    ok, Thank you for all your help.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘WP 5.5.1 + WOO 4.5.2 Uncaught ReferenceError: product_id is not defined’ is closed to new replies.