• Resolved Debesyla

    (@debesyla)


    Here’s a situation:

    1) Default wordpress theme (twentynineteen)
    2) Woocommerce with default settings
    3) “Barn2 product filter” plugin with default settings
    4) Translatepress with default settings + an extra language.

    For some reason those filter scripts break down… only in default language? Doesn’t seem to matter what language is set as default (tried Lithuanian, English (UK), French…), but scripts only break down in the one that is default/main language, works fine in other languages.

    So… Any idea what could this be? Where should I look at? Does translatepress load Woocommerce product list differently only in default language? Are there any debuging features that I could try out and poke around? ??

    There is one more thing about this riddle. “Autoptimize” .js optimization plugin with default settings (only basic minimization on) somehow fixes this bug. Other minimization plugins (like “Wp-rocket”, etc.) don’t fix it. Somehow. I am out of ideas what could it be, spent two hours already poking around settings, this is a big mystery… Any ideas what could be happening?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Alex

    (@alexcozmoslabs)

    Hi,

    Actually, TranslatePress doesn’t make changes to the default langauge, so the issue should not be related to our plugin. Did you try to test with TP deactivated?
    Only the additional languages are the results of our plugin processing.

    Kind Regards,

    Thread Starter Debesyla

    (@debesyla)

    Oh yeah, that’s the funny thing! ??

    It (Woocommerce product filter) works fine without TP enabled.
    It also works fine with TP enabled in non-default languages.
    It doesn’t work with TP enabled in default language.
    But it does work with TP enabled in default language if Autoptimize plugin is on with “Optimize javascript” setting is on in that plugin.

    So, yeah… Confusing…

    The filter plugin throws out “Cannot read properties of undefined (reading ‘innerHTML’)” in default language only, so I guess it’s something about .js load order? But Autoptimize support states that it doesnt switch up script load order… And by comparing the pages HTML with and without Autoptimize I can only see that it indeed only minifies .js, nothing more.

    I did also try to compare HTML of pages in default in secondary language, it seems TP adds only one script, so… Yeah…

    I am out of ideas what could I try to test ??

    Plugin Support Alex

    (@alexcozmoslabs)

    Hi again,

    Can you please visit TranslatePress -> Settings -> Advanced
    Then, enable these features 1 by 1 in this order and try to see if it makes a difference. Disable them back if it makes no difference. Also please disable or clear the cache if you have any.

    1. Fix missing dynamic content
    2. Disable dynamic translation

    If those will not fix, you should tell me exactly how to replicate this on my local instance. If it’s a bug, our dev team will try to fix it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘.js issues only in default language?’ is closed to new replies.