• Resolved Alexander Gieg

    (@alexgieg)


    The change in code to force loading the latest jQuery from http://code.jquery.com causes breakage in HTTPS sites. Google Chrome refuses to load insecure (HTTP) content within HTTPS sites. Thus, every single functionality that relies on jQuery, from WordPress own uses to those of plugins, stops working when WP Google Maps is installed on an HTTPS blog.

    Changing the code to detect whether one’s running under HTTPS also won’t work, because the HTTPS version of code.jquery.com has an invalid certificate, thus resulting in the same refusal from Chrome to load that content.

    If you really, absolutely MUST load jQuery from a 3rd party site, please do it from “http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js” and “https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js”, taking care with whether the link starts with HTTP or HTTPS depending on the permalink of every URL, otherwise much breakage will follow.

    A better approach however, in my opinion, is to simply not do it at all. Those who wish to have jQuery loaded from somewhere other than their own sites can install a specialized plugin that automatically takes care of these issues, such as Use Google Libraries. And those who don’t can have several reasons for this, from not knowing it can be done to actively deciding it must not be done so as not to rely on a 3rd party being available or not for major mission critical functionality.

    I hope this helps. Thanks!

    http://wordpress.org/extend/plugins/wp-google-maps/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WPGMaps

    (@wpgmaps)

    Hi Alexander
    Thanks again for your valuable input.

    I found that not including it caused more hassles than including it as MANY users have outdated jQuery’s installed and the fact that my plugin requires 1.8.3 or greater was causing a massive amount of support emails on my side. Hence the reason to try over-ride all other plugin’s jQuery register calls and replace it with my own.

    I’m releasing a new version this morning that has jquery within it’s JS folder and calls on that rather than a 3rd party CDN. This should sort out the HTTP/HTTPS issue.

    Is this better for you?

    Please can you contact me on nick[@]wpgmaps.com as there is something I’d like to discuss with you 🙂

    Kind regards
    Nick

    Thread Starter Alexander Gieg

    (@alexgieg)

    Thanks! It fixes the issue quite nicely!

    A minor request: could you perhaps add a filter so that one could disable this behavior programmatically? Something like this would work:

    if (!is_admin() && apply_filters('wpgm_replace_jquery',true) === true) {

    This way one would be able to disable it if needed by simply adding an add_filter('wpgm_replace_jquery','__return_false') to one’s code.

    PS.: I’m sending you an e-mail in a minute. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Please revert decision to replace jQuery loading’ is closed to new replies.