[Plugin: Scripts Gzip] Two problems (user directories and css images)
-
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.
- The topic ‘[Plugin: Scripts Gzip] Two problems (user directories and css images)’ is closed to new replies.