my page is trying to load this file /sites/default/files/languages/it_Et3NQJm4afZYHEnSM9oq5ylZkAw2ExqC8PQtEYrxXDU.js but it gives 404 error. This error is spamming my log page with errors messages. If i check the ftp the file is there but if i try to load it from the url it gives 404 error. Is it a permission issue? How can i fix? Thanks
1 Answer
Yes, it is a permission issue. Did you move the website to a different server? Sometimes, after you change the server (maybe from localhost to production) some files can have permissions issue.
That's a Drupal generated file, so you can make a backup of it, remove it, flush all caches, cross your fingers and load the page again. Hopefully Drupal will create the file with the correct permissions and the issue is solved.
If this doesn't work, check the watchdog again and check what's the problem again. Maybe there is a different problem... like that your Temporary directory is not writable.
If you still receive the same error. Try to flush all caches. Then, try to flush CSS and JS cache (this can be done with administration menu module in the first link in the left).
If that doesn't work, you must check the file permissions directly, so lets check if the user and group are configured to what they should be.
Then lets check if the file is accesible, maybe modify the permissions to 644 and check again. If this doesn't work, then change it to 664, If still doesn't work, 666; it should work now, but the user and group of the file are not well configured.
EDIT: Permissions updated as suggested by @Clive.
-
1You shouldn't use 755/775 for those files (and never 777 for anything), use 644/664/whatever, but keep the execute bit off– Clive ♦Commented Oct 3, 2016 at 20:21
-
The canonical reference to this is drupal.org/node/244924– mpdonadio ♦Commented Oct 3, 2016 at 22:24