• Resolved tabasco86

    (@tabasco86)


    Hi Frank,

    how are you doing? I’m back after a long time with another question ??

    I run autoptimize on my site as you know, as well as 2 other plugins, “woocommerce gravity forms product addons” and yotpo social reviews. In the past all worked well. Now I’ve decided to get rid of the yotpo plugin (loads slow external scripts and dont need it anymore) but cant because it always causes an error in the woocommerce gravity forms product addons js. I’ve tried excluding wgfpa from AO but without success, hence at the moment I’m obliged to continue having yotpo active as otherwise the other plugin breaks..
    Do you have any ideas what might cause this or how I could fix it?

    thanks for your help.
    BR and have a great week,

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Frank Goossens

    (@futtta)

    long time indeed, hope all is well and you had great end-of-year celebrations? ??

    regarding the problem;
    * do you get JS errors on your browser console?
    * when disabling AO (by addint ?ao_noptimize=1 to the URL); do you still have errors on browser console? does WGFPA work?

    frank

    Thread Starter tabasco86

    (@tabasco86)

    Hi Frank,

    Yepp, had a good time but not with a big party. happy new years to you too!

    This is the js error I get in the console:
    gravityforms-product-addons.js:28 Uncaught ReferenceError: accounting is not defined
    at update_dynamic_price (gravityforms-product-addons.js:28)
    at gform_product_total (gravityforms-product-addons.js:9)
    at gformCalculateTotalPrice (gravityforms.min.js:1)
    at gformInitPriceFields (gravityforms.min.js:1)
    at HTMLDocument.<anonymous> (?ao_noptimize=1:147)
    at i (jquery.js:2)
    at Object.fireWith [as resolveWith] (jquery.js:2)
    at Function.ready (jquery.js:2)
    at HTMLDocument.K (jquery.js:2)

    WGFPA works fine when I deactivate AO. I’ve tried excluding gravityforms, gravityforms-product-addons, etc from AO but with no success…

    Very strange how deleting a plugin screws up another one, especially since before installing yotpo everything was working fine, including wgfpa…

    Currently I’m excluding the following from js
    gravityforms,query.js,add-to-cart-variation.min.js,s_sid,smowtion_size,sc_project,WAU_,wau_add,comment-form-quicktags,edToolbar,ch_client,seal.js

    Any ideas are welcome, I can’t wait to delete the plugin as it hurts me to see something up and running that isnt being used anymore ??

    thanks for your help!

    Plugin Author Frank Goossens

    (@futtta)

    are you aggregating inline JS? if so, look through your unoptimized HTML source for the block of inline JS that has defines the accounting variable and try excluding that?

    Thread Starter tabasco86

    (@tabasco86)

    I’m currently not aggregating inline JS or css.
    I’ll activate that now and check if that helps though…
    Any other ideas?

    Thread Starter tabasco86

    (@tabasco86)

    good call Frank to inline JS, thanks!
    I inlined JS and after fiddling around and excluding 2 other scripts now it all works with yotpo deactivated.

    have a great day!

    Thread Starter tabasco86

    (@tabasco86)

    there’s still some kind of error on the page (the admin bar doesn’t appear) but whatever. That I can live with ??

    Plugin Author Frank Goossens

    (@futtta)

    ah, in that case your aggragated JS was forced into head I guess?

    best (and default) setup (nowadays) is:
    * not to force JS in head
    * not to aggregate inline JS (it can cause cache size issues)
    * exclude jquery.js from js optimizations

    but your mileage may vary ??

    frank

    Thread Starter tabasco86

    (@tabasco86)

    I figured. that’s the way I had it previously with no js in head, no aggregate js and exluding jquery…
    but that was causing issues.
    I just discovered that aggregating inline js is causing other issues with i.e. yith zoom magnifier so for the moment I’ll revert back to installing yotpo plugin until I figure out how to circumvent the issue ….

    Amir

    Plugin Author Frank Goossens

    (@futtta)

    yeah, vaguely remember we spent considerable time on finding the right config for your site ??

    but doesn’t;

    at HTMLDocument.<anonymous> (?ao_noptimize=1:147)

    imply that you captured the JS error with AO disabled, meaning the problem (also) exists when not autoptimizing after all?

    Thread Starter tabasco86

    (@tabasco86)

    Hi Frank,

    I know. It seems that for some reason my site likes making life more difficult ??
    When I disable the AO minify js (inside AO config) and disable yotpo all works fine so it’s definitely something with js. I’ve tried excluding all wgfpa js files I can’t figure out what might the cause.

    Plugin Author Frank Goossens

    (@futtta)

    this discussion was continued via mail and excluding accounting.js and a custom script solved the problem.

    until next time tabasco86 ??

    frank

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘woocommerce gravity forms product addons conflict’ is closed to new replies.