By elee337 on
I'm getting a lot of page not found errors for css and js files in sites/default/files like sites/default/files/css/css_29cec92ee5bcad82b0dba794ec1455b2.css and sites/default/files/js/js_254746c0f73cccf7bb5d04638f68b78b.js. I recently inherited the site so I'm not sure how long this has been a problem, but everything on the site seems to look perfectly fine. The only problem is that I get tons of page not found errors in the report log. Is there any way to figure out what's causing these?
Comments
Those are the
Those are the aggregated/cached CSS and JS files. When you visit the Performance page in the admin and enable CSS and JS aggregation, it tries to create those files as a means of caching the code and speeding up page loads by minimizing the number and size of files that the browser needs to request. It could be that the permissions on the files directory are wrong and it was unable to create them the last time they were built, or that there is some corruption and the cache should be rebuilt. I would start by just forcing it to rebuild them by going to the Performance page under Site Configuration in D6 and clearing the cache. See if you get any errors. Also, visit Reports >> Status Report and look for any errors there such as a problem writing to the files directory or any portion of it. Hope this helps and good luck!
I've flushed the cache
I've flushed the cache numerous times (today and previously) but it hasn't fixed the problem. I looked under performance and the caching mode was set to "Disabled." I tried enabling it and I still have the same problem.
The Block cache and Bandwidth optimizations are all set to enabled. There is no minimum cache lifetime and page compression is set to enabled.
I've looked at my status report and everything there has a green check mark but Upload Progress is set to "Note enabled."
What do you mean when you say that the permissions in the files directory are wrong and how could I fix this if it's the problem?
Thanks for your help!
Did you click the "Clear
Did you click the "Clear cached data" button just below the bandwidth optimizations? Try that, also, try disabling the CSS and JS optimization and testing with it off, then with it back on again. You probably won't want to leave it disabled however, because that can cause problems with IE if there are too many CSS files.
With regard to the permissions, I would have expected to see an error on the status page if Drupal couldn't write to the files directory, although if it's only files/css or files/js that it cannot write to, it doesn't look like it will show an error there. However, when I made my css & js aggregation directories non-writable, I got an error while disabling optimization -- also when clicking "Clear cached data". If you don't get an error, that's probably not the issue. But if you would like, paste here what the permissions are on the directories "files", "files/css" and "files/js" and we'll see if anything looks unusual.
But basically, I would try disabling and re-enabling the optimizations -- see if that works or gives you any more information. Good luck!
Having same problem
I'm having the same problem as described by the original post. I know it's not a permissions problem because the directories are empty after flushing the cache, and repopulated after browsing to the site.
I am assuming people (most likely robots) are hitting the site using a cached page (such as google cache). If only the page is cached, the users browser will try to download the "old" (pre-cache cleared) JS and CSS files.
I have verified on my site that this will cause errors of this type by going to the cached version of my page. You can check yours by visiting:
http://webcache.googleusercontent.com/search?q=cache:<your url without http>I'm not sure why these resource files need to change their name on every cache reset. This could be fixed if the names only change if the performance/cache settings are changed.
Did you find a fix for this?
Did you find a fix for this? I'm having the same issue. I have:
1. Cleared the cache
2. Disabled and re-enabled aggregation (CSS & JS)
3. Visited in multiple browsers
4. Used the google webcache link above which did produce the error on the site
Is there anyway to keep this from happening, is this bad for search engine purposes?
The same problem
i didn't find any solution