• Resolved Stefan

    (@kalevskis)


    Hello there,

    I have installed contact form 7 and wpml along with w3 total cache.

    On non-default language pages the contact form 7 javascript is being loaded twice. Once inside minified file and once as normal javascript:
    https://monosnap.com/file/e3CiuMQoPuKVwBZxZWMrWlZR00WTlA
    This is not happening on default language pages (the javascript is being loaded only inside minified javascript).

    As result, contact forms are being triggered twice each time submitted, thus giving error to submitter.

    Please advice on how to fix this.

    p.s. In functions file I’ve set that contact form 7 javascript file should be loaded only on pages where contact form appears (with wp_dequeue_script function).

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello@kalevskis,

    You need WPML extension for Improving page caching interoperability with WPML.
    However, We also need to update our WPML extension so thank you for bringing this to our attention.
    The required logic will be added to the extension in future releases.
    Thank you for your patience.

    Thread Starter Stefan

    (@kalevskis)

    Thanks for the fast answer. Hope you will include it soon!

    schnellbert

    (@schnellbert)

    Experiencing the same issue here. As far as I can tell, a simple one line change in Util_Environment.php line 491 would fix it:

    $home_url = get_home_url();

    to

    $home_url = get_option(‘home’);

    As suggested by the WPML team here: https://wpml.org/errata/w3tc-is-not-minifying-files/

    It would be nice to get this fixed ASAP.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @kalevskis and @schnellbert,

    We are already working on this with WPML.
    Thank you for your patience.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Contact form script double loaded on different language (wpml)’ is closed to new replies.