Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter JumpmanFR

    (@jumpmanfr)

    What I figured out is that the client doesn’t want to wait too long for the server to answer, during and XMLHTTPRequest.
    In your function quick_chat_update_messages_ajax_handler, there is a sleep, with a while, that makes the client wait up to 20 seconds, and in my case, that completely stops refreshing.
    I changed the behaviour: I asked the client to ask for new messages every 5 seconds (or so), and the server answers directly, regardless of the existence of new messages.
    It’s a quick and dirty fix, it could increase dramatically the amount of transferred data, but at least, the chat works for me now.

    But maybe it gives you an idea of what’s going on, and how you could find a better way to fix the problem. Tell me what you think of that!

    Thread Starter JumpmanFR

    (@jumpmanfr)

    I use Chrome Dev Tools, I gave you the callstack:

    POST https://sessionsenfolie.free.fr/wp-admin/admin-ajax.php
    f.support.ajax.f.ajaxTransport.sendjquery.js:4
    f.extend.ajaxjquery.js:4
    f.each.f.(anonymous function)jquery.js:4
    jQuery.quick_chat_update_messagesquick-chat-core.js:304
    (anonymous function)quick-chat-core.js:407
    f.Callbacks.njquery.js:2
    f.Callbacks.o.fireWithjquery.js:2
    wjquery.js:4
    f.support.ajax.f.ajaxTransport.send.djquery.js:4

    Please let me know what else you need to check.

    Also, because of my web host configuration, the PHP?version is only 5.1.3 instead of 5.2.4. I made some modifications on WordPress to make it work.
    Could this be the source of my problem?

    Thread Starter JumpmanFR

    (@jumpmanfr)

    Hi,

    Thank you for your answer.

    But when I tried to use the default theme, the problem was still present, so why?

    Also, I’m not too much into WP development, so what is the proper way to load jquery from the theme?

    Regards,
    JumpmanFR

Viewing 3 replies - 1 through 3 (of 3 total)