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;
|