-
Bug
-
Resolution: Fixed
-
Critical
-
2.6
-
MOODLE_26_STABLE
-
MOODLE_26_STABLE
-
w32_
MDL-40995_m26_minifyreworked -
There are some new problems when minifying CSS and JS:
1/ js minify is now used from outputrequirementslib file for compression of YUI module info
2/ the latest minify uses autoloader - it would slow down the rest of moodle
3/ the unsetting of SERVER variable is a nasty hack that might potentially break some caching
4/ minify is intended for direct CSS/JS file serving, but we need only the compression of files
5/ in csslib we first minify and then replace our placeholders, this is wrong; minify works with files only but we do not want to create any temporary files there
Proposed solution:
- create new core_minify class
- with methods ::css(), ::css_files(), ::js(), js_files()
- use only as little as possible from minify
- replace minify loader or unregister it after use
Nota that this does not affect stable branches much, no need to backport.