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

After upgrade to Moodle 4.4, Onetopic throws error trying to require a non-existent format.js from topics plugin. #181

Closed
lightweight opened this issue May 6, 2024 · 4 comments

Comments

@lightweight
Copy link

lightweight commented May 6, 2024

After upgrading from Moodle 4.1 to 4.4 recently, I encountered the following error in the onetopic plugin version 4.1.04...

Coding error detected, it must be fixed by a programmer: Attempt to require a JavaScript file that does not exist.

[More information about this error](http://docs.moodle.org/404/en/error/debug/codingerror)
Debug info: /course/format/topics/format.js
Error code: codingerror
Stack trace:

    line 737 of /lib/outputrequirementslib.php: coding_exception thrown
    line 452 of /lib/outputrequirementslib.php: call to page_requirements_manager->js_fix_url()
    line 84 of /course/format/onetopic/format.php: call to page_requirements_manager->js()
    line 348 of /course/view.php: call to require()

It turns out /course/format/onetopic/format.php line 84, references a no-longer-existent (in Moodle 4.4 at least) javascript file:

$PAGE->requires->js('/course/format/topics/format.js');

Commenting that line out removes the error, and I haven't noticed any other side effects.

I see this inclusion was removed with commit 72eacc5 but I'm not sure how to upgrade to that version (not familiar enough with Moodle), so (currently) assuming it's being held back due to other dependencies...

@lightweight
Copy link
Author

lightweight commented May 6, 2024

Further info - I've tried installing the 4.2.02 version of the format_onetopic plugin (there doesn't seem to be a corresponding release here in Github?)... and the same inclusion error occurs, but it's been moved to /course/format/onetopic/classes/header.php - again, commenting out line 151 seems to fix the problem.

I gather this plugin has been tested with Moodle 4.2... but it seems that it's not compatible with Moodle 4.4 - not sure about 4.3.

@izendegi
Copy link
Contributor

izendegi commented May 8, 2024

Hi @lightweight

We've seen this same issue and realized that #178 fixes it

@lightweight
Copy link
Author

Wow, many thanks!

@davidherney
Copy link
Owner

Hi...

The master is now compatible with Moodle 4.4+ in beta. It needs proof. If you can try it please comment.

Saludos

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

3 participants