Error 404 in js files

Error 404 in js files

by Nicolas Magoulis -
Number of replies: 5

Greetings to everyone,

I'm trying to install Moodle 3.9.1 on Apache, MySql enviroment and although the installer runs fine, when i load the moodle site it seems like css is missing. In the Browser console i get Error 404 in some js files.

Can anyone help?

Thanks in advance.

Attachment 2.PNG
Attachment errors.PNG
Average of ratings: -
In reply to Nicolas Magoulis

Re: Error 404 in js files

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

What's the URL in $CFG->wwwroot in config.php (which is in the Moodle source code folder)? What's the URL being used in the browser? These must be the same.

In reply to Leon Stringer

Re: Error 404 in js files

by Nicolas Magoulis -
Thanks for the answer Leon. They are exactly the same.
In reply to Nicolas Magoulis

Re: Error 404 in js files

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Can you access these resources directly in the browser (change https://moodle.example.com to your site's URL):

https://moodle.example.com/lib/javascript.php

You should get No valid javascript files found.

https://moodle.example.com/lib/javascript.php/-1/lib/javascript-static.js

You should see some JavaScript source code:

// Miscellaneous core Javascript functions for Moodle
// Global M object is initilised in inline javascript

Do you get these? I'm wondering if there's a configuration issue with slasharguments on the server. You could try adding $CFG->slasharguments = false; to config.php, it's not the recommended setting but it might indicate what the issue is.