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

JavaScript broken on first page load after clearing Moodle JS Cache #32

Open
t-schroeder opened this issue Aug 16, 2023 · 0 comments
Open

Comments

@t-schroeder
Copy link

t-schroeder commented Aug 16, 2023

After clearing Moodle's JavaScript Cache the first page load receives this comment at the top of first.js:

// JS module 'mod_verbalfeedback/report' cannot be loaded, or does not contain a javascript module in AMD format. "define()" not found.

Somehow that leads to the web browser receiving a JavaScript error and essentially not being able to load any JS for the page. This only affects the first page load after clearing Moodle's JS Cache. Following page loads don't have this problem anymore. The above comment is also no longer returned when requesting first.js on following page loads.

This is on the one hand a bug in Moodle core, I'd argue, because it's probably not the intention that JavaScript for the whole page should be broken, even though it makes the problem more noticeable. But on the other hand it's caused by an issue in this plugin, namely that you have an AMD module with all it's code being commented out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant