• Resolved eryanv

    (@eryanv)


    I have found two problems with this plugin:

    First of all, if WordPress is being run out of a user’s home directory (like what I do for testing), this plugin cannot determine the path for each of the items it is trying to compress.

    <link rel="stylesheet" href="https://localhost/~eryanv/i4k/wp-content/plugins/scripts_gzip/gzip.php?css=https://localhost/;https://localhost/;https://localhost/" type="text/css" media="screen" />
    <script type="text/javascript" src="https://localhost/~eryanv/i4k/wp-content/plugins/scripts_gzip/gzip.php?js=https://localhost/;https://localhost/;https://localhost/;https://localhost/;https://localhost/;https://localhost/;https://localhost/;https://localhost/"></script>

    Second problem I found:

    When it is successful and compresses the files, the background images from a given CSS file may no longer point to the correct url. If WordPress is not installed in the web server root (for instance mine is in a directory called wp, and has to be accessed through https://hostname/wp), the path translations done in the CSS files are no longer accurate.

    Originally in the CSS file I had:
    url(‘images/topframe.png’)
    which was then translated into:
    url(‘/wp-content/themes/i4k/images/topframe.png’)
    which is close, but does not account for the fact that it should really look like:
    url(‘/wp/wp-content/themes/i4k/images/topframe.png’)

    Other than that, I’ll be excited to see where this goes.

Viewing 15 replies - 1 through 15 (of 16 total)
  • I sorta expected subdirectory problems. Don’t have WP installed in any subdirectory myself, but this problem should be solvable.

    I’ll get right it on on sunday or monday.

    Hm. Does this version help any?

    Thread Starter eryanv

    (@eryanv)

    The second problem is fixed, however nothing has changed with the first situation.

    Could y’all paste in the original CSS and script links?

    Thread Starter eryanv

    (@eryanv)

    This is what I start off with, without the plugin.

    <script type="text/javascript" src="https://localhost/~eryanv/i4k/wp-includes/js/jquery/jquery.js"></script>
    <script type="text/javascript" src="https://localhost/~eryanv/i4k/wp-content/themes/i4k/js/i4k.js"></script>
    
    <link rel="stylesheet" href="https://localhost/~eryanv/i4k/wp-content/themes/i4k/style.css" type="text/css" media="screen" />
    
    <script type='text/javascript' src='https://localhost/~eryanv/i4k/wp-includes/js/prototype.js?ver=1.6'></script>
    <script type='text/javascript' src='https://localhost/~eryanv/i4k/wp-includes/js/scriptaculous/wp-scriptaculous.js?ver=1.8.0'></script>
    <script type='text/javascript' src='https://localhost/~eryanv/i4k/wp-includes/js/scriptaculous/effects.js?ver=1.8.0'></script>
    <script type='text/javascript' src='https://localhost/~eryanv/i4k/wp-content/plugins/lightbox-2/lightbox.js?ver=1.8'></script>
    <script type='text/javascript' src='https://localhost/~eryanv/i4k/wp-content/plugins/picasaview/picasaview.js?ver=1.0'></script>

    This is what they reduce to.

    <link rel="stylesheet" href="https://localhost/~eryanv/i4k/wp-content/plugins/scripts_gzip/gzip.php?css=https://localhost/;https://localhost/;https://localhost/" type="text/css" media="screen" />
    
    <script type="text/javascript" src="https://localhost/~eryanv/i4k/wp-content/plugins/scripts_gzip/gzip.php?js=https://localhost/;https://localhost/;https://localhost/;https://localhost/;https://localhost/;https://localhost/;https://localhost/"></script>

    I’m sure it’s the ‘~’ character which is messing things up, probably has to do with it either not being escaped somewhere along the way, or possibly incorrectly escaped.

    It was the ~ character.

    Here, how’s this?

    pre2

    I’ve made a proper class of it and it should filter out the base address of the WordPress installation. With a bit of luck it’ll work for others too.

    Thread Starter eryanv

    (@eryanv)

    Works for me.

    Thanks!

    Still doesn’t work for me, turns my site into a cssless mess like 0.5.1

    My install is in /blog

    You can have a look at my site at https://farmvillefanatic.com

    Let me know if there is any specific info I can get for you.

    Doesn’t work on K2 Theme.

    I should mention I am using WP Super Cache plugin. Do I even need Scripts Gzip?

    Yeah, some links still don’t work correctly.

    I’ve been trying to fix PHP-css files. Try the link below?
    0.5.3pre1

    I’ve also just realized that <!–if ie7–> style things are either ignored or automatically included (not sure yet) so I have to fix that also.

    In the meantime, how does the above version work?

    0.5.3 released. Should fix a few css problems.

    Nope, .5.3 still breaks my site heavily. Like I mentioned earlier though, is this needed or compatible with WP Super Cache? I use the gzip compression on it.

    Thanks.

    I have no idea. I’ve never used Super Cache. I guess I’ll download it later and try it out.

    If you disable Super Cache and scriptsgzip still breaks your site, could you show me the site so that I can see what kind of links are in it?

    I was also having problems with the scripts/gzip plugin…

    first, it appears to not display my leaderboard advertisement, but it does however display my sidebar advertisement. I was wondering if it is stopping the js from being displayed on the leaderboard ad.

    Also, if my domain is sportsblognet.com and my css is located on sportsblognet.com, it takes all images and assumes that they are dervied from sportsblognet.com.

    But in the css i mark the background urls as images.sportsblognet.com with the full address to the image, but the plugin turns it from url(“https://images.sportsblognet.com/wp-content/themes/test-theme/_inc/images/logo.png&#8221;) and turns it into url(../wp-content/themes/test-theme/_inc/images/logo.png) which is looking for the image on sportsblognet.com instead of images.sportsblognet.com, and the image does not appear.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘[Plugin: Scripts Gzip] Two problems (user directories and css images)’ is closed to new replies.