Site logo

[Support request] Javascript error WPML

Home Forums Support [Support request] Javascript error WPML

Home Forums Support Javascript error WPML

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #733040
    Antal

    Hello Tom,

    On a new WP install, with (child theme of) GeneratePress, Elementor and WPML I get a javascript error. This prevents the language to display correctly. (automatic language switcher). When I switch themes top TwentySeventeen the issue is gone.
    Is this something that can be fixed?

    app.js?ver=4.0.8:8 Uncaught ReferenceError: jQuery is not defined
    at Object.<anonymous> (app.js?ver=4.0.8:8)
    at r (app.js?ver=4.0.8:1)
    at Object.<anonymous> (app.js?ver=4.0.8:8)
    at r (app.js?ver=4.0.8:1)
    at app.js?ver=4.0.8:1
    at app.js?ver=4.0.8:1

    Thanks 🙂
    Kind regards,
    Antal

    #733166
    David
    Staff
    Customer Support

    Hi there,

    GP doesn’t enqueue jQuery by default, but that plugin should do seeing as it requires it, may be worth reporting it to the author. In the meantime you try this PHP snippet:

    add_action( 'wp_enqueue_scripts', function() {
        wp_enqueue_script( 'jquery' );
    } );
    #733288
    Antal

    Thanks David, I reported it back to WPML.
    https://wpml.org/forums/topic/javascript-error-prevents-language-redirect/
    Hope they can look a little deeper into this. 🙂

    Thanks again.
    Kind regards,
    Antal

    #733422
    David
    Staff
    Customer Support

    Ok keep us posted 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.