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

debug or raw YUI libraries are not loaded

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.2
    • Libraries
    • MOODLE_22_STABLE
    • Hide

      Load any page that loads the YUI library and see which versions of the files are actually loaded in debugging and non debugging mode. You should be able to change the setting at line 128 to change which version of the library is loaded when debugging is set to DEBUG_DEVELOPER the raw or debug libraries.

      Show
      Load any page that loads the YUI library and see which versions of the files are actually loaded in debugging and non debugging mode. You should be able to change the setting at line 128 to change which version of the library is loaded when debugging is set to DEBUG_DEVELOPER the raw or debug libraries.

      Although when Moodle is set to DEBUG_DEVELOPER the YUI loader logs all kind of messages to the console the debug or raw libraries are not loaded.

      From bug report on Using Moodle by Matt Gibson here : http://moodle.org/mod/forum/discuss.php?d=191639

      I've noticed that with DEBUG_DEVELOPER on, plus javascript combo loading and caching off, I still get the minified versions of the YUI libraries.

      It seems to be that line 128 of /lib/outputrequirementslib.php does this:

      $this->yui3loader->filter = YUI_RAW;

      Followed by line 164, which does this:

      $this->M_yui_loader->filter = ($this->yui3loader->filter == YUI_DEBUG) ? 'debug' : '';

      So that the filter is never set to 'debug'; If I change YUI_RAW to YUI_DEBUG on line 128, all is well.

      Have I missed some setting, or is this a bug? I was under the impression that the debug versions ought to load automatically when DEBUG_DEVELOPER was set.

      It seems that at line 164 :

               $this->M_yui_loader->filter       = strtolower($this->yui3loader->filter);

      Works well as well and this allows a developer to choose to use either the debug or raw libraries.

      I think someone who knows this code better should look at what should be done here. Should YUI_DEBUG be set to 'debug' rather than "DEBUG" and the same with YUI_RAW and then strtolower would not be needed at line 164 :

               $this->M_yui_loader->filter       = $this->yui3loader->filter;

            skodak Petr Skoda
            jamiesensei Jamie Pratt (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.