-
Bug
-
Resolution: Fixed
-
Minor
-
4.3.8, 4.4.4
This can be reproduced with any file-picker:
- Edit repository/draftfiles_ajax.php to add the line throw new dml_write_exception('Error deleting file'); just after the line case 'delete':.
- Go to a form with a file-picker, e.g. upload photo when editing your profile (https://qa.moodledemo.net/user/edit.php?id=3&returnto=profile - logged in as teacher)
- Drag in one file (of the right type. This needs to be a JPEG).
- Click on the uploaded file, then click the 'Delete' button in the pop-up.
- Click 'Yes' in the Confirm popup.
Expected result: The error we added at Step 1. above should be displayed in a pop-up.
Actual result: The error is ignored. (But, if you inspect the Ajax request in your browser consold, you can see that the error was sent back from PHP to JavaScript, only to be ignored there.)