WordPress.org

Ready to get started?Download WordPress

Forums

Quick Chat
quick fix for QuickChat with qlanguage (3 posts)

  1. Joust
    Member
    Posted 1 year ago #

    Hi Marko, hi all,
    in V4.10, QuickChat does not work with certain configurations of the popular qlanguage wordpress plugin. The reason: In qlanguage you're able to select between different languages by subdomain (e.g.: de.domain.com, en.domain.com) the way many business sites solve the multilanguage issue today. Reason: QuickChat makes XHR calls with full url back to the server for loading JS and communicating chat messages. WordPress manages only the base domain (e.g. domain.com) when qlanguage is used, these calls get blocked by the users browser (cross domain restriction) => you see LOADING... forever. Fix: QuickChat requests the server url by calling std wordpress api. If you make these requested urls relative (stripping the domain part, resulting in urls like "/wp-admin/ajax-admin.php"), QuickChat works like a charm. Find these lines in quick-chat.php and remove the protocol and server part with parse_url():

    $this->url = plugin_dir_url(__FILE__);
                    'ajaxurl' => admin_url('admin-ajax.php'),
                    'ajaxurl' => admin_url('admin-ajax.php'),

    Marko: Any chance to to fix that officially?
    Kolja

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

  2. Marko-M
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks,
    since you provide good explanation and idea for workaround I'll take some time to review and most probably integrate some changes to support qlanguage. I feel like proper fix would be that qlanguage guys tap into the the get_admin_url() using 'admin_url' filter to make proper way of getting admin-ajax.php work with qlanguage.

    Regards,
    Marko

  3. Joust
    Member
    Posted 1 year ago #

    Hi Marko,
    you're right, tapping into admin_url from qlanguage side would fix a lot but maybe not all issues. get_admin_url would have to know about the currents client request url. I will send the qlanguage author a message as well :)
    Thanks for the quick reply!
    Kolja

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.