WordPress.org

Ready to get started?Download WordPress

Forums

Quick Chat
[resolved] Chat loads for ever when Admin is behind SSL (5 posts)

  1. onepack
    Member
    Posted 1 year ago #

    I have a develop environment for a site without ssl and a live environment with ssl. I noticed that the develop works like a charm but on the live site it only shows "Loading".
    Switching SSL off in the WP-Config solves the problem but this is of course not the desired solution.

    I had the same issue with wp-polls and here the cause was that the admin-ajax.php could not be accessed. This was solved by telling the ajax url that ssl and thus https was used.

    When I check my footer however I see that the url is already using https. (see under)

    var quick_chat = {"url":"http:\/\/www.domain.com\/wp-content\/plugins\/quick-chat\/","ajaxurl":"https:\/\/www.domain.com\/wp-admin\/admin-ajax.php","version":"4.10","debug_mode":"1"};

    So what else needs to be changed so that the chat works in a SSL environment??

    http://wordpress.org/extend/plugins/quick-chat/

  2. onepack
    Member
    Posted 1 year ago #

    When I use https:// on the chat page the chat will load. Can this be changed or is it mandatory since the backend is behind SSL?

    wp-polls is working on the frontpage without https and is also accessing the ajax file.

    What is the difference?

    Thanks in advance for your reply!

  3. Marko-M
    Member
    Plugin Author

    Posted 1 year ago #

    Hello onepack,
    could you open quick-chat.php, find line 337 and replace following:

    'ajaxurl' => admin_url('admin-ajax.php'),

    with:

    admin_url('admin-ajax.php', (is_ssl() ? 'https' : 'http')),

    Please report back with your results.

  4. onepack
    Member
    Posted 1 year ago #

    Hi There!

    Thanks, yeah, it works!
    I also changed around the line on 350 that also works with the ajaxurl.

    Another solution was that I forced the page into https but this is more simple and works.

    Same solutions as wp-polls.

    Greetings!

  5. Marko-M
    Member
    Plugin Author

    Posted 1 year ago #

    Yes I got it from wp-polls source code ;) It'll be in the next release, thanks for reporting.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic