• Resolved andresmolina

    (@andresmolina)


    Hi,

    The chatbox is not coming up at my site https://www.sophya.es

    If you inspect the website, you will see an error coming up, which im not sure how to fix:

    Uncaught TypeError: jQuery.parseHTML is not a function
    at Object.success (wplc_u.js?ver=7.0.03:86)
    at o (jquery-1.7.2.min.js?ver=1.7.2:2)
    at Object.fireWith [as resolveWith] (jquery-1.7.2.min.js?ver=1.7.2:2)
    at w (jquery-1.7.2.min.js?ver=1.7.2:4)
    at XMLHttpRequest.d (jquery-1.7.2.min.js?ver=1.7.2:4)

    Would you please give me a hand?

    Thanks
    kind regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there

    Please go to wp-live-chat-support/js/wplc_u.js and scroll down to roughly line 86 where you’ll find a line of code that looks like this:

    response = JSON.parse(response);

    Please replace it with this:

    response = JSON.parse( trim( response ) );

    Does this help at all?

    Thread Starter andresmolina

    (@andresmolina)

    Hey,

    I read through your support tickets and I understood it was a problem with the java version used in the theme, so i went online to find a solution, and i found it, by putting this code onto the functions.php file it will use google api for loading the java (or that is what i understood):

    function sof_load_scripts() {
        if ( !is_admin() ) {
            wp_deregister_script('jquery');
            wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js', '1.8.2', false);
            wp_enqueue_script('jquery');
        }
    }
    add_action( 'wp_enqueue_scripts', 'sof_load_scripts' );

    And it worked like a charm.

    I tried your fix mentioned above, to see the result, and unfortunetely it does not make any change… it still fails to load up the chat. so I went back and reactivate my code.

    There is only one thing, which i dont know how to fix (im totally noob on coding) which behaves a bit weird since i did the change. If you go to the home page on the right hand side of the slider, there are 4 icons with some text.. if you play around with the two on the right hand side, you will see how for a split of a second the yellow square gets pushed down…

    I know is no tyour issue, but if you could help me on fixing that i would very much appreciate it.

    Hi there

    Please try the ammended code below and let me know if this helps?

    jQuery 1.8 is a bit outdated, I’ve changed the code to use 1.11 which might fix both the chat and the new issue on the website.

    function sof_load_scripts() {
        if ( !is_admin() ) {
            wp_deregister_script('jquery');
            wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', '1.11.2', false);
            wp_enqueue_script('jquery');
        }
    }
    add_action( 'wp_enqueue_scripts', 'sof_load_scripts' );
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Chat box not showing up, jquery error’ is closed to new replies.