JavaScript problem disables all edit functions in Moodle

Issue #12 new
Fernando Oliveira created an issue

This plugin disables the edit links in certain situations. For our site, this happens when the Sharing Cart plugin is also installed. I (mistakenly) reported the issue here: https://moodle.org/mod/forum/discuss.php?d=87044#p1544394. Looks like some kind of JavaScript conflict. Also, disabling the Bootstrap Elements plugin doesn't seem to fix the issue, the plugin needs to be completely uninstalled.

Comments (5)

  1. Amanda Doughty

    We have the same issue.

    The JS error:

    require.js:168 Uncaught Error: Mismatched anonymous define() module: function(a) {…

    I also tracked it down to a statement in another plugin:

    require.config({

    });

    If I remove the plugin or comment out the code block above then I don’t get the error.

  2. Amanda Doughty

    I have fixed our issues by editing fontawesome-iconpicker.js

    In 2 places remove:

    (function(a) {
    "use strict";
    if (typeof define === "function" && define.amd) {
    define([ "jquery" ], a);
    } else if (window.jQuery && !window.jQuery.fn.iconpicker) {
    a(window.jQuery);
    }
    })(function(a) {
    "use strict";

    and replace with:

    define(['jquery'], function(a) {

  3. Log in to comment