WordPress.org

Ready to get started?Download WordPress

Forums

ReFlex Gallery » WordPress Photo Gallery
[resolved] SSL and Mixed Content Warnings (4 posts)

  1. vanderkerkoff
    Member
    Posted 1 year ago #

    Morning all

    I'm getting a mixed content warning on some IE versions and Chrome is also complaining with it's shield when I activate the plugin.

    We're running all SSL with a main redirect from http to https for everything.

    Chrome says this

    [blocked] The page at https://www.yournewu.co.uk/ ran insecure content from http://code.jquery.com/jquery-migrate-1.1.1.js?ver=3.5.1.

    Deactivating the plugin removes the call to that jquery file and problem goes away.

    Has anyone got any ideas how to resolve this?

    http://wordpress.org/extend/plugins/reflex-gallery/

  2. vanderkerkoff
    Member
    Posted 1 year ago #

    I've done a bit more digging. The code is being called in from reflex-gallery.php

    approx line 85

    //Add gallery scripts
    public function add_gallery_scripts() {
    wp_enqueue_script('jquery');
    wp_register_script('jquery_migrate', 'http://code.jquery.com/jquery-migrate-1.1.1.js', array('jquery'));
    wp_enqueue_script('jquery_migrate');
    wp_register_script('flexSlider', WP_PLUGIN_URL.'/reflex-gallery/scripts/flexslider/jquery.flexslider-min.js', array('jquery'));
    wp_register_script('prettyPhoto', WP_PLUGIN_URL.'/reflex-gallery/scripts/prettyphoto/jquery.prettyPhoto.js', array('jquery'));

    Sorry about the formatting

  3. webaware
    Member
    Posted 1 year ago #

    Since the script is being registered correctly, but with the wrong URL, you can fix it by installing/activating the SSL Insecure Content Fixer plugin.

    [edited comment, sorry for confusion]

    Plugin author: you can load this script over SSL when appropriate by using this trick:

    $proto = is_ssl() ? 'https' : 'http';
    wp_register_script('jquery_migrate', "$proto://code.jquery.com/jquery-migrate-1.1.1.js", array('jquery'), null);
    wp_enqueue_script('jquery_migrate');

    Also note that if your script has version information embedded in the name, you can pass null as the version string and the script won't have ?ver=3.5.1 tacked on the end; this is better for browser cache utilisation.

    cheers,
    Ross

  4. hahncgdev
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    This issue has been corrected in version 1.4.5 released today.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags