WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Fails to load resources after Force SSL Exclusively

[Resolved] Fails to load resources after Force SSL Exclusively

  • When I enable “Force SSL Exclusively” the pages load very slow and do not load the CSS + JS resources properly.

    It also breaks the minify, I think because of the following:

    Example of resource links:

    wp-contentthemesresponsive/style.css

    Should be:

    wp-content/themes/responsive/style.css

    Seems that it does not add slashes to the directories when Force SSL exclusive is enabled.

    Any reason for this? I have uninstalled and reinstalled the plugin.

    Thanks

    http://wordpress.org/extend/plugins/wordpress-https/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Mike Ems

    @mvied

    No, I don’t have that issue on any of my sites. I eyeballed the code but I don’t see anywhere that would cause this issue. I can take a look at your site for you. My email is mike[at]mvied[dot]com.

    So I have come to the conclusion to just create a custom menu using:

    Appearance > Menus

    All HTTP page just use the full url of http://www.mydomain.com

    and all HTTPS pages are using your plugin with the secure page checkbox to force it (this is the only thing I currently use the plugin for)

    My issue is I have 2 https pages and the rest need to remain http

    I have modded wordpress in wp-includes/general-template.php with the following code to ensure my home url / siteurl remains protocol relative as I have been reading that WordPress 3.0 does not support relative urls by default:

    case 'url' :
    			$output = getRelativePath(home_url());
    			break;
    		case 'wpurl' :
    			$output = getRelativePath(site_url());

    and then:

    function getRelativePath($url)
    {
    	$secure_connection = false;
    	if(isset($_SERVER['HTTPS']))
    	{
    		if ($_SERVER["HTTPS"] == "on")
    		{
    			return str_replace("https://".$_SERVER['SERVER_NAME'], "", $url);
    		}
    	}
    
         return str_replace("http://".$_SERVER['SERVER_NAME'], "", $url);
    }

    I wish there was a better way to do this without modifying the base wordpress install but have not found a solution.

    Maybe you know of a more appropriate solution?

    Plugin Author Mike Ems

    @mvied

    The appropriate solution is to fix the bug in the plugin, which I can’t do because I can’t reproduce it. I can easily fix it if you allow me to look at it.

    I wish this was possible however for company security concerns and the fact that the website currently is not viewable to the outside world I can only give you code snippets to understand my situation.

    I dont think it has anything to do with your plugin, I think your plugin works great for the majority and by all means keep on rockin’ it!

    I think it has to do with the fact that my wordpress install is slightly hacked up (modifications that were made in the above posted code), because I needed my site to work unlike what wordpress was intended for. (using protocol relative paths for everything).

    If I can give you any other info without logging in please let me know what to provide, I will do my best.

    Thanks

    Plugin Author Mike Ems

    @mvied

    Somewhere there is code replacing forward slashes with nothing. I’ve had issues like this with my plugin before, but not recently. I don’t think I can help you without looking at it myself since it could literally be anything.

    From your post, I think we had a similar issue after loading HTTPS on WP version 3.4.1, upgrading WP to 3.4.2 resolved the issue. I just posted another issues where making changes to HTTPS setting, Save Changes does not work. Hope this is helpful…

    Thanks guys for your responses. I want to upgrade to the latest version of WordPress just to see if this would fix it however it is going to be a process proving to my company that the upgrade would be justified. Any main points to why upgrading from 3.3.1 to 3.4.2 would be greatly appreciated.

    Plugin Author Mike Ems

    @mvied

    It’s not going to fix it.

    You can see all the changes for version 3.4 here.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] Fails to load resources after Force SSL Exclusively’ is closed to new replies.