Skip to main content
Topic: script/css minimizer bug (Read 2054 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

script/css minimizer bug

It's commented out, but if the gzip option is uncommented there's a bug in it.  It's missing the '/' separator between the output directory and the file name.

Code: [Select]
$fp = gzopen($this->_archive_dir . $this->_archive_name . '.gz', 'w9');

Should be
Code: [Select]
$fp = gzopen($this->_archive_dir . '/' . $this->_archive_name . '.gz', 'w9');

And why are jquery and and sha256.js not included into the combined scripts but loaded separately?

Re: script/css minimizer bug

Reply #1

Great catch! :D

sha256 I think it's just slipped through.
jquery... I think it's on one side because of all the alternative ways of loading it and on the other because we should be sure it's loaded before anything else, but... yeah, it should be added there as well.
Bugs creator.
Features destroyer.
Template killer.

Re: script/css minimizer bug

Reply #2

I was looking at jquery, and make it work with the minifier is tricky, very tricky. At least if we want to support all the alternatives. In particular the "auto" mode: when jquery source is set to auto, a small bit of js is added, but this must be just after the jquery url and before any other script (and this is true for both jquery and jquery UI), but with the current tools this is impossible... :(
Bugs creator.
Features destroyer.
Template killer.

Re: script/css minimizer bug

Reply #3

I think it would be a mistake to try and add jquery (plus UI in some cases) to the hive ... Just my opinion.

Re: script/css minimizer bug

Reply #4

Yeah, it is already minified, it is a pain to deal with, better keep it as an exception... ::)
Bugs creator.
Features destroyer.
Template killer.

 

Re: script/css minimizer bug

Reply #5

They are also (mostly) served from the CDN so keeping it separate will be faster.