diff --git a/Changes.md b/Changes.md index 332abdb4..d8664225 100644 --- a/Changes.md +++ b/Changes.md @@ -14,6 +14,7 @@ Version 4.0.1.1 - TBR 9. Fix 'Failing core PHPUnit test' - #19. 10. Apply MDL-74602. 11. Fix 'Collapsable in question preview won't work' - #22. +12. Fix 'doctype error' - #23. Version 4.0.1.0 - 17/04/22 -------------------------- diff --git a/layout/layout.php b/layout/layout.php index c7c12e15..ca333e3b 100644 --- a/layout/layout.php +++ b/layout/layout.php @@ -25,6 +25,9 @@ defined('MOODLE_INTERNAL') || die; +// Echo the document type here with the $OUTPUT global to prevent core complaining that it hasn't been output! +echo $OUTPUT->doctype(); + // Get the renderer for this plugin. $toolbox = \theme_foundation\toolbox::get_instance(); $output = $toolbox->get_core_renderer(); diff --git a/layout/maintenance.php b/layout/maintenance.php index 039c9f32..3fbd15f3 100644 --- a/layout/maintenance.php +++ b/layout/maintenance.php @@ -25,6 +25,9 @@ defined('MOODLE_INTERNAL') || die; +// Echo the document type here with the $OUTPUT global to prevent core complaining that it hasn't been output! +echo $OUTPUT->doctype(); + $data = new \stdClass(); $data->output = $OUTPUT; diff --git a/layout/plainlayout.php b/layout/plainlayout.php index 2f545157..3783d146 100644 --- a/layout/plainlayout.php +++ b/layout/plainlayout.php @@ -25,6 +25,9 @@ defined('MOODLE_INTERNAL') || die; +// Echo the document type here with the $OUTPUT global to prevent core complaining that it hasn't been output! +echo $OUTPUT->doctype(); + // Get the renderer for this plugin. $toolbox = \theme_foundation\toolbox::get_instance(); $output = $toolbox->get_core_renderer(); diff --git a/templates/columns1.mustache b/templates/columns1.mustache index 0f515429..2f4e51ef 100644 --- a/templates/columns1.mustache +++ b/templates/columns1.mustache @@ -28,7 +28,6 @@ { "sitename": "Moodle", "output": { - "doctype": "", "htmlattributes": "lang='en'", "page_title": "Test page", "favicon": "favicon.ico", diff --git a/templates/columns2.mustache b/templates/columns2.mustache index c8c621a7..24c7f2a7 100644 --- a/templates/columns2.mustache +++ b/templates/columns2.mustache @@ -34,7 +34,6 @@ { "sitename": "Moodle", "output": { - "doctype": "", "htmlattributes": "lang='en'", "page_title": "Test page", "favicon": "favicon.ico", diff --git a/templates/columns3.mustache b/templates/columns3.mustache index 1bf20561..d6ffd936 100644 --- a/templates/columns3.mustache +++ b/templates/columns3.mustache @@ -36,7 +36,6 @@ { "sitename": "Moodle", "output": { - "doctype": "", "htmlattributes": "lang='en'", "page_title": "Test page", "favicon": "favicon.ico", diff --git a/templates/embedded.mustache b/templates/embedded.mustache index 67888560..64e7e7ef 100644 --- a/templates/embedded.mustache +++ b/templates/embedded.mustache @@ -25,7 +25,6 @@ Example context (json): { "output": { - "doctype": "", "htmlattributes": "lang='en'", "page_title": "Test page", "favicon": "favicon.ico", @@ -33,7 +32,6 @@ } } }} -{{{ output.doctype }}} {{{ output.page_title }}} diff --git a/templates/maintenance.mustache b/templates/maintenance.mustache index 7d127cb8..7fa45817 100644 --- a/templates/maintenance.mustache +++ b/templates/maintenance.mustache @@ -25,7 +25,6 @@ Example context (json): { "output": { - "doctype": "", "htmlattributes": "lang='en'", "page_title": "Maintenance page", "favicon": "favicon.ico", @@ -33,7 +32,6 @@ } } }} -{{{ output.doctype }}} {{{ output.page_title }}} diff --git a/templates/partials/head.mustache b/templates/partials/head.mustache index 23269000..eafac8a8 100644 --- a/templates/partials/head.mustache +++ b/templates/partials/head.mustache @@ -25,14 +25,12 @@ Example context (json): { "output": { - "doctype": "", "htmlattributes": "lang='en'", "page_title": "Test page", "favicon": "favicon.ico" } } }} -{{{ output.doctype }}} {{{ output.page_title }}}