-
Bug
-
Resolution: Fixed
-
Major
-
2.9.9, 3.0.7, 3.1.3, 3.2
-
MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
-
MOODLE_32_STABLE, MOODLE_33_STABLE
-
MDL-57103-master -
-
3.4 Sprint 1
Since the change in MDL-56958 exceptions are not handled in ajax requests
lib/ajax/service.php returns html and the ajax handlers never detect the error.
Steps to reproduce:
1. Generate a fake error:
diff --git a/lib/ajax/service.php b/lib/ajax/service.php
|
index 3298c0e7a7..044903137e 100644
|
--- a/lib/ajax/service.php
|
+++ b/lib/ajax/service.php
|
@@ -41,6 +40,7 @@ if ($requests === null) {
|
$lasterror = json_last_error_msg();
|
throw new coding_exception('Invalid json in request: ' . $lasterror);
|
}
|
+throw new coding_exception('oh no!');
|
$responses = array();
|
|
// Defines the external settings required for Ajax processing.
|
2. Load the messaging interface
Expected result:
- The error is reported
Actual result:
* The error is silently ignored
- caused a regression
-
MDL-61366 MDL-57103 tries to use $PAGE before it has been initialised
- Closed
- has been marked as being related by
-
MDL-58310 Error occurs whenever in progress ajax request is cancelled (random "undefined" popup)
- Closed
-
MDL-57100 lib/amd/src/notification.js is not detecting ajax errors since MDL-56268
- Closed
-
MDL-59312 Error object is discarded when handling failed AJAX requests (random "undefined" popup continues)
- Closed
-
MDL-60603 Undefined error message popup
- Closed
- is a regression caused by
-
MDL-56958 Ajax webservice uses wrong renderer by default
- Closed