-
Bug
-
Resolution: Fixed
-
Major
-
2.5.1, 2.6
-
MOODLE_25_STABLE, MOODLE_26_STABLE
-
MOODLE_25_STABLE
-
-
On the themes forum an issue has been highlighted in post https://moodle.org/mod/forum/discuss.php?d=236254 where the stack trace given in the custom block is:
Can not add jQuery plugins after starting page output!
|
|
line 397 of /lib/outputrequirementslib.php: call to debugging()
|
line 11 of /blocks/myblock/block_myblock.php: call to page_requirements_manager->jquery_plugin()
|
line 293 of /blocks/moodleblock.class.php: call to block_myblock->get_required_javascript()
|
line 238 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
|
line 951 of /lib/blocklib.php: call to block_base->get_content_for_output()
|
line 1003 of /lib/blocklib.php: call to block_manager->create_block_contents()
|
line 353 of /lib/blocklib.php: call to block_manager->ensure_content_created()
|
line 3071 of /lib/outputrenderers.php: call to block_manager->region_has_content()
|
line 3107 of /lib/outputrenderers.php: call to core_renderer->body_css_classes()
|
line 49 of /theme/clean/layout/columns3.php: call to core_renderer->body_attributes()
|
line 850 of /lib/outputrenderers.php: call to include()
|
line 780 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
|
line 101 of /index.php: call to core_renderer->header()
|
It is stated that the jQuery libraries have been included correctly:
public function get_required_javascript() {
|
parent::get_required_javascript();
|
|
$this->page->requires->jquery();
|
$this->page->requires->jquery_plugin('ui');
|
$this->page->requires->jquery_plugin('ui-css');
|
$this->page->requires->js('/blocks/myblock/myscript.js');
|
}
|
Which matches the information given on http://docs.moodle.org/dev/jQuery#jQuery_UI_in_add-on_block.
It looks like with the 'Clean' theme that test '4' on MDL-15727 will now fail because the method 'body_attributes()' was added in MDL-39838 and applied to the 'Clean' theme in MDL-40089 after the tests on MDL-15727 were run. Therefore I suspect a regression has taken place.