Moodle 3.9 : Script error for "filter_amanote/main"

Issue #5 resolved
Nicolas Dunand created an issue

In Moodle 3.9+ (Build: 20200626), using filter_amanote build 2020061101, the filter script ‘main.js’ cannot be loaded.

Errors in the browser console are:

Error: Script error for "filter_amanote/main"
[Error] Error: Script error for "filter_amanote/main"
http://requirejs.org/docs/errors.html#scripterror
    defaultOnError (require.js:143)
    onError (require.js:549)
    onScriptError (require.js:1738)

Examining the plugin’s `amd` directory, the structure look unusual. Normally the `src` directory should contain a .js file and the `build` directory should contain a .min.js file.

Renaming this file https://bitbucket.org/amaplexsoftware/moodle-filter_amanote/src/master/src/amd/build/main.js as `main.min.js` and copying this same file as `src/main.js` solved the issue.

Il looks like the build has not been done in Moodle’s suggested way: https://docs.moodle.org/dev/Javascript_Modules .

Comments (2)

  1. Log in to comment