WordPress.org

Ready to get started?Download WordPress

Forums

AssetsMinify
Still broken with SSL (5 posts)

  1. pepe
    Member
    Posted 3 months ago #

    Unfortunately, the plugin is still broken with SSL. For example, see my blog http://mundschenk.at vs. https://mundschenk.at.

    http://wordpress.org/plugins/assetsminify/

  2. pepe
    Member
    Posted 3 months ago #

    To answer my own bug report: The code in guessPath is wrong. It uses various PHP constants defined by WordPress which do not take SSL into account. Here's a patch using the correct functions to access those URLs:

    --- AssetsMinifyInit.php.old	2014-01-06 16:13:04.580747449 +0100
    +++ AssetsMinifyInit.php	2014-01-06 16:40:54.439924606 +0100
    @@ -128,14 +128,16 @@
     			return false;
    
     		$file_path = false;
    +		$wp_plugin_url = plugins_url();
    +		$wp_content_url = content_url();
    
     		// Script is enqueued from a plugin
    -		if( strpos($file_url, WP_PLUGIN_URL) !== false )
    -			$file_path = WP_PLUGIN_DIR . str_replace(WP_PLUGIN_URL, '', $file_url);
    +		if( strpos($file_url, $wp_plugin_url) !== false )
    +			$file_path = WP_PLUGIN_DIR . str_replace($wp_plugin_url, '', $file_url);
    
     		// Script is enqueued from a theme
    -		if( strpos($file_url, WP_CONTENT_URL) !== false )
    -			$file_path = WP_CONTENT_DIR . str_replace(WP_CONTENT_URL, '', $file_url);
    +		if( strpos($file_url, $wp_content_url) !== false )
    +			$file_path = WP_CONTENT_DIR . str_replace($wp_content_url, '', $file_url);
    
     		// Script is enqueued from wordpress
     		if( strpos($file_url,  WPINC) !== false )
  3. pepe
    Member
    Posted 2 months ago #

    Alessandro, have you had the chance to look at the patch yet?

  4. ferne97
    Member
    Posted 2 months ago #

    Having the same issue with SSL. Tried the patch mentioned above but didn't seem to fix the issue for me.

  5. pepe
    Member
    Posted 2 months ago #

    It did not? That's strange. Did you clear your page cache (on the server) as well as the browser cache?

Reply

You must log in to post.

About this Plugin

About this Topic

Tags