(Solved) Installing And Upgrading Help "Loading Failed For Script" Js Errors During Moodle 3.10 Install

1 min read

Installing and upgrading help
"Loading failed for script" js errors during moodle 3.5.6 install (and after on cli installed site)

Best Solution 

You've redacted the site domain name in the output but the links still contain this. Hopefully this doesn't mean you've leaked any sensitive information. It has the advantage that we can see the problem directly.

It looks like 1) debugging is enabled for the site and 2) config.php contains a deprecated implicit object creation, presumably for $CFG.

This is causing JavaScript content to be served with an HTML fragment containing a PHP warning inserted at the start which the browser isn't expecting.

The sample config-dist.php shows how $CFG should be created (from Moodle 1.9 onwards):

unset($CFG);  // Ignore this line
global $CFG;  // This is necessary here for PHPUnit execution
$CFG = new stdClass();
ensure the top of config.php matches, these lines should appear before any $CFG->property = … lines.

Total Execution Time content: 0.00025426546732585 Mins Total Execution Time social : 0.0000 Mins

Read Next

Total Execution Time red next: 0.0000 Mins

Search Now






Categories