Unexpected Output while processing AJAX request
The following error can sometimes come up on the Site Administration menu (depending on your Moodle version):
Coding error detected, it must be fixed by a programmer: Unexpected output whilst processing AJAX request. This could be caused by trailing whitespace. Output received: ' '
What causes it is there is a new function in later versions of Moodle in
This is a useful check for developers, and therefore when the site is in
DEVELOPER debug mode it throws an exception. You can change the debug mode to something less than
DEVELOPER and you shouldn’t get an exception (but note that there is still an underlying problem).
One catch is that if the site administration navigation is failing, you can’t actually get to Site administration > Development > Debugging.
An easy work around, visit
https://your-moodle.com/admin/settings.php?section=debugging and adjust your debugging settings there.