[Drupal] Common issues behind files not loading in a drupal 6 site

| | 1 min read

I had an issue with a Drupal site that files not getting loaded due which issue on website alignments. This files not getting loaded issues was noticed on reviewing the console log errors in browsers.

The following issues can be the problem for a files loading error on sites:

  • Modified file system path(Administer > Site configuration > File system).
  • Permission issues on the files folder
  • PHP syntax errors or memory limit
  • CSS/JS Compression Issues(admin/settings/performance)
  • .htaccess rewrite rules
  • HTTP request status Fails

Checked the console for any error in the files and the following error were listed:

  "NetworkError: 404 Not Found - http://dev.example.uk/sites/default/files/advagg_css/css_a615774a7d38c3401399e7a6016e2433_1.css" 
ReferenceError: jQuery is not defined

The following procedures followed on fixing the above issue on the site:

  • Checked for the file permission for the css and js
      su chmod 745 sites/default/files/css/
      su chmod 745 sites/default/files/js/
  • Cleared css/ js aggregations
  • Checked the path for the files(Administer > Site configuration > File system)
  • Checked the files original files path
  • checked the boost cache where the files are stored(/gwoa_dev/cache/perm/sites/all/themes/fusion/fusion_core/css)
    >>Again its page not found.
  • Checked the boost settings(admin/settings/performance)
    >>Boost rules are provided on .htaccess
  • Checked the .htaccess file and removed the boost rules from the same
    >>Now the problem is fixed , the site has loaded without any issues.
  • Checked the .htaccess boost rules and the path specified for the files is specified to live on code
    >>Changed the path to dev site
         RewriteCond /homepages/35/d448991082/htdocs/gwoa_dev/cache/perm/www.gwoa.co.uk%{REQUEST_URI}_\.css\.gz -s

    Fixed the issues with css/js files failed to load on the website