We just migrated a moodle site and for the most part everything is working well except the admin link site administration. Once it is clicked, it will go on spinning for 3 minutes until it timeouts with a 500 error and an error message Unexpected token < in JSON at position 0
. Here is the console output:
moodle/lib/ajax/getsiteadminbranch.php 500 (Internal Server Error)
I disabled JS to get debug turned on but wasn't able to replicate the bug until I logged out and logged back in (JS turned on).
Replicating the steps above, I got a more verbose console log
It seems to get hung up on
moodle-block_navigation: Loading navigation branch via AJAX: siteadministration
Here is the stack trace:
SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse >()
at Object.Y.namespace.parse (https://foo-bar.io/moodle/theme/yui_combo.php?rollup/3.13.0/yui-moodlesimple.js:37340:18)
at BRANCH.ajaxProcessResponse (https://foo-bar.io/moodle/theme/yui_combo.php?m/1477092989/block_navigation/navigation/navigation-debug.js:653:33)
at Y.Subscriber._notify (https://foo-bar.io/moodle/theme/yui_combo.php?rollup/3.13.0/yui-moodlesimple.js:26572:35)
at Y.Subscriber.notify (https://foo-bar.io/moodle/theme/yui_combo.php?rollup/3.13.0/yui-moodlesimple.js:26601:24)
at Y.CustomEvent._notify (https://foo-bar.io/moodle/theme/yui_combo.php?rollup/3.13.0/yui-moodlesimple.js:26264:17)
at Y.CustomEvent._procSubs (https://foo-bar.io/moodle/theme/yui_combo.php?rollup/3.13.0/yui-moodlesimple.js:26390:36)
at Y.CustomEvent.fireSimple (https://foo-bar.io/moodle/theme/yui_combo.php?rollup/3.13.0/yui-moodlesimple.js:26357:18)
at Y.CustomEvent._fire (https://foo-bar.io/moodle/theme/yui_combo.php?rollup/3.13.0/yui-moodlesimple.js:26339:29)
at IO.fire (https://foo-bar.io/moodle/theme/yui_combo.php?rollup/3.13.0/yui-moodlesimple.js:27492:22)
The code worked on the old environment but obviously I am still missing something in the new one. Any assistance would be appreciated.
moodle/lib/ajax/getsiteadminbranch.php
because that script has failed./var/log/httpd/error.log
but will depend on what web server (eg Apache) and operating system you are running.