WordPress.org

Ready to get started?Download WordPress

Forums

Nice Navigation
Hardlinking to http://, Mixed Content Pop-ups, Fix (1 post)

  1. Joe Banks
    Member
    Posted 2 years ago #

    On sites where the URL is https://, the Nice Navigation plugin is returning http:// instead (hard linking to http:// instead of being relative)

    Examples in header:

    <link rel='stylesheet' id='nice-navigation-css'  href='http://mysite/wp-content/plugins/nice-navigation/styles.css?ver=1.2' type='text/css' media='screen' /></strong>
    <strong><script type='text/javascript' src='http://mysite/wp-content/plugins/nice-navigation/script.js?ver=1.2'></script>

    While the other header references use https:// correctly:

    <link rel='stylesheet' id='thickbox-css'  href='https://mysite/wp-includes/js/thickbox/thickbox.css?ver=20090514' type='text/css' media='all' />
    <script type='text/javascript' src='https://mysite/wp-includes/js/l10n.js?ver=20101110'></script>
    <script type='text/javascript' src='https://mysite/wp-includes/js/jquery/jquery.js?ver=1.6.1'></script>

    This causes those annoying pop-ups with handling mixed content in IE:
    http://blogs.msdn.com/b/ieinternals/archive/2009/06/22/https-mixed-content-in-ie8.aspx

    ISSUE:

    WP_PLUGIN_URL // full url, no trailing slash
    [the wordpress site itself must be set up for http]
    This line grabs what wordpress is reporting as the plugin url

    NOTE: These constants are *not SSL aware*. Apparently they are intended for Core use, not Plugins. See http://codex.wordpress.org/Determining_Plugin_and_Content_Directories

    SOLUTION: Change reference from WP_PLUGIN_URL to plugins_url() on this line

    define( "NICE_NAVIGATION_URL", plugins_url() . '/nice-navigation/');

    http://wordpress.org/extend/plugins/nice-navigation/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic