Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6
    • Component/s: JavaScript, Libraries
    • Labels:
    • Testing Instructions:
      Hide

      1/ run phpunit tests
      2/ enable js cache and disable theme creator mode
      3/ purge caches and verify the js and css served to browser (it should be minified the same way as before)
      4/ delete $CFG->dataroot/localcache and reload page, verify the JS and CSS cache files get recreated properly
      5/ test TinyMCE works
      6/ verify the YUI_config module stuff embedded in pages is minified

      Show
      1/ run phpunit tests 2/ enable js cache and disable theme creator mode 3/ purge caches and verify the js and css served to browser (it should be minified the same way as before) 4/ delete $CFG->dataroot/localcache and reload page, verify the JS and CSS cache files get recreated properly 5/ test TinyMCE works 6/ verify the YUI_config module stuff embedded in pages is minified
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w32_MDL-40995_m26_minifyreworked

      Description

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    18/Nov/13