Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-26315

Added theme javascript causes minify to fail completely

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not a bug
    • Affects Version/s: 2.0.1
    • Fix Version/s: None
    • Component/s: Performance, Themes
    • Labels:
      None
    • Environment:
      LAMP
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      When adding a javascript file via a theme config, a line like (this is jquery):

      if (href.search(/^[^:/]:\/\/[^/]\/?/) == -1){

      }

      causes the javascript minifier (called in /moodle2/theme/javascript.php) to fail completely and not write any javascript to the cache. This does not happen if cache is turned off (i.e., in theme designer mode). Only occurs when theme cache is turned on.

      Perhaps a temporary fix would be to test if the minified js was written to the cache (in javascript.php) and, if not, send the uncached files.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: