Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doctype error #23

Open
miotto opened this issue May 30, 2022 · 18 comments
Open

doctype error #23

miotto opened this issue May 30, 2022 · 18 comments
Assignees
Labels
Bug Something isn't working

Comments

@miotto
Copy link

miotto commented May 30, 2022

If you click on the button "Purge all caches" under the URL https://moodle-url/admin/purgecaches.php, you get a doctype error.

doctype_error

In the commit abe7d59, 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)

@gjb2048
Copy link
Collaborator

gjb2048 commented May 30, 2022

@gjb2048
Copy link
Collaborator

gjb2048 commented May 30, 2022

@miotto Is Foundation the default theme or are you switching to it via the URL?

@miotto
Copy link
Author

miotto commented May 30, 2022

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?

@gjb2048
Copy link
Collaborator

gjb2048 commented May 30, 2022

@miotto Yes please, but only if you have time.

@miotto
Copy link
Author

miotto commented May 31, 2022

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.

@gjb2048
Copy link
Collaborator

gjb2048 commented May 31, 2022

@miotto Thanks for testing and the information, interesting!

@gjb2048
Copy link
Collaborator

gjb2048 commented May 31, 2022

@miotto Odd, identical setup and I can't replicate -> my code at -> 72e18a6

@miotto
Copy link
Author

miotto commented Jun 1, 2022

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.

@gjb2048
Copy link
Collaborator

gjb2048 commented Jun 1, 2022 via email

@gjb2048
Copy link
Collaborator

gjb2048 commented Jun 1, 2022 via email

gjb2048 added a commit that referenced this issue Jun 1, 2022
@gjb2048 gjb2048 added Bug Something isn't working and removed Pending replication labels Jun 1, 2022
@gjb2048
Copy link
Collaborator

gjb2048 commented Jun 1, 2022

@miotto Please try 16df81d.

@miotto
Copy link
Author

miotto commented Jun 2, 2022

Now it works very well, thanks.

@gjb2048
Copy link
Collaborator

gjb2048 commented Jun 2, 2022

@miotto Thank you, what version are you running in production please? i.e. so I know about backporting?

@miotto
Copy link
Author

miotto commented Jun 2, 2022

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.

@gjb2048
Copy link
Collaborator

gjb2048 commented Jun 2, 2022

@miotto Thanks, in that case the M3.11 version still has the double doctype issue.

gjb2048 added a commit that referenced this issue Jul 3, 2022
@gjb2048
Copy link
Collaborator

gjb2048 commented Aug 17, 2022

Still open as moodlehq/moodle-plugin-ci#175

@rogiervandongen
Copy link

rogiervandongen commented Nov 7, 2023

@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?

@gjb2048
Copy link
Collaborator

gjb2048 commented Nov 10, 2023

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants