-
Improvement
-
Resolution: Duplicate
-
Minor
-
None
-
3.1
-
MOODLE_31_STABLE
While creating a new web service and adding new functions to it, I got the following error/exception "Cannot find file with external function implementation" due to erroneous "externallib.php" file from one of the contrib plugins installed on my system.
The exception does not show which plugin was causing this error, and so I added the full reference to the problematic missing file to the output of the exception.
It seems easy and trivial to add this improvement to the code, especially for cases where the system admin can see what is causing the error and remove/disable the problematic plugin without the immediate need for a developer. (Obviously, it should ultimately be solved by a developer with access to the code)
Suggested patch:
// https://github.com/moodle/moodle/blob/master/lib/externallib.php#L87
|
if (!file_exists($function->classpath)) { |
throw new coding_exception('Cannot find file with external function implementation = '.$function->classpath); |
}
|
- duplicates
-
MDL-49794 external_function_info gives vague error messages
- Closed
- is duplicated by
-
MDL-68971 The error message when a web service can't be found totally unhelpful
- Closed
-
MDL-55553 Display external function missing file path, when exception occurs
- Closed
- will help resolve
-
MDL-61287 Web Services Documentation fault check when plugin does not exist
- Closed