Open miotto opened 2 years ago
@miotto Is Foundation the default theme or are you switching to it via the URL?
I used Foundation as the default theme. But I did not use a newly installed Moodle 4.0, only an updated Moodle 3.11 > 4.0. I could try it tomorrow with a newly installed Moodle 4.0?
@miotto Yes please, but only if you have time.
I tried a newly installed Moodle 4.0.1+ (Build: 20220527) with the Foundation Theme 4.0.1.1 (2022041701). In the Moodle setting "Appearance" > "Theme selector", I have set Foundation as the default theme. The error was displayed again.
@miotto Thanks for testing and the information, interesting!
@miotto Odd, identical setup and I can't replicate -> my code at -> https://github.com/gjb2048/moodle-theme_foundation/commit/72e18a65418ad0912ab2b2ddff8c79bacc1b83d7
I tried it with the same commit.
Info: In Moodle I have set the debugging to "DEVELOPER: extra Moodle debug messages for developers" and yes for "Display debug messages". The operating system is Ubuntu 20.04 with Apache 2.4.41 and PHP 7.4.3.
Currently I have created a second file layout/layout2.php
with doctype. I have assigned it in the file config.php
at "layouts" > "admin". With this it works.
Ok, well odd as "Apache/2.4.48 (Win64) OpenSSL/1.1.1l PHP/7.4.23" on Win
Updated to "Apache/2.4.53 (Win64) OpenSSL/1.1.1o PHP/7.4.29" and can now replicate!
Now it works very well, thanks.
@miotto Thank you, what version are you running in production please? i.e. so I know about backporting?
Our production Moodle is Moodle 3.11 with the appropriate Foundation Theme version. The error did not occur there.
In the Foundation Theme Branch MOODLE_311
, the doctype entry is present in the file layout/layout.php
. I don't think anything needs to be changed.
I am currently testing Moodle 4 with the appropriate Foundation Theme for the next major update. And that's where the error occurred.
@miotto Thanks, in that case the M3.11 version still has the double doctype issue.
Still open as https://github.com/moodlehq/moodle-plugin-ci/issues/175
@gjb2048 Just an FYI, this is not limited to this theme (although not getting the error message, just a lack of a doctype). I just walked into the exact same probem with theme Boost on Moodle4.3+ (Build: 20231013) It seems to be a structural Moodle issue. Switching to theme Classic creates the exact same problem.
I started noticing it when tinyMCE would no longer load and the console states "tinymce.js:19313 Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."
This makes me think, although I'm 100% speculating, there might be something with an output buffer being cleared?
@rogiervandongen I'm intrigued. What makes you think it's not a theme issue? What makes you think its an issue with the output buffer? How can I replicate the situation you describe?
If you click on the button "Purge all caches" under the URL https://moodle-url/admin/purgecaches.php, you get a doctype error.
In the commit abe7d596a500585b43d4abce7a6d595f5f9f2019, doctype is removed from the file
layout/layout.php
. When I insert the line again, the error is no longer displayed.Test with Moodle 4.0.1+ (Build: 20220527) and foundation Version 4.0.1.1 (2022041701)