Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-77982

External class aliases are defined in externallib.php that is no longer included in AJAX requests

XMLWordPrintable

    • MOODLE_402_STABLE

      I hit this problem when testing tool_certificate plugin on Moodle LMS 4.2. Luckily we have very good test coverage and were able to detect it quickly but a lot of addon plugins don't have it.

      This error can easily be left unnoticed after upgrade.

      Most of plugin developers prefer to keep a single version of plugin for multiple versions of Moodle LMS so they would be still using "old" names for the external classes.

      Aliases are not included automatically in AJAX requests, which throws exceptions when using inplace editable, for example (maybe more callbacks/functions).

      This is the example of the fix we had to add to lib.php in tool_certificate :

      My proposal is to make sure that all aliases are available - either move them away from lib/externallib.php or require lib/externallib.php in the lib/ajax/service.php where it used to be

            Unassigned Unassigned
            marina Marina Glancy
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.