I've been using Drupal for almost 2 years now, and this one really has me stumped-- it's driving me nuts.
I'm nearly finished developing the CSS for a Drupal theme, and suddenly, none of the changes that I make to the CSS files show up on the site!
I've turned off all caching under "performance." That includes page caching, css caching, js, block, etc. I've cleared the caches many times. I've also cleared browser caches-- this happens across multiple browsers and computers.
The fact is that the file that is served to the browser is not the same file that I'm placing on the FTP server.
I tried deleting the style.css file that is acting up, and as expect, no CSS shows up on the front end. Here's what's really weird: I then tried deleting all of the CSS from the css file (making the file blank), and Drupal still serves a version of the file that has over 2000 lines of CSS!
I have no way of changing the css on my site. It's crazy. Does anyone have any idea why this might happen?
Please help. Thanks!
Comments
Theme stashes
>>I then tried deleting all of the CSS from the css file (making the file blank), and Drupal still serves a version of the file that has over 2000 lines of CSS!
Firebug will show you the path and file name for the CSS used to generate the page. Some themes stash a version of the stylesheets in sites/default/files/... which is independent of the cache system. When you make changes to the stylesheet the theme configuration has to be saved at > admin/build/themes/settings/your-theme before it will update the stashed files.
Hope this helps,
The only solution I have found for this thus far...
I am having the same issue. My site resides on a VPS server and I suspect that they are caching the css files on the server side, since some css files get referenced from multiple, if not all pages, this greatly increases the response time of your site. I have not found a way to clear this cache from the administrative panel provided by my hosting company, but I did find a way to get around this.
What you need to do is change the name of your css file and then update the reference in the file that refers to it. So in my example, in which I edited the main style.css file for the Easy Breeze theme, I got the changes to reflect publicly as follows:
1. After editing the style.css file, I renamed it to style1.css.
2. I updated the reference to this file in /sites/all/theme/easybreeze/easybreeze.info to point to style1.css instead of style.css as so: stylesheets[all][] = style1.css
3. I incremented the datestamp at the bottom by 1 (just to be safe, not sure if this is even needed) and saved the file.
4. Uploaded the new easybreeze.info file via FTP. Did a hard refresh of the site and after a short time (within 2 mins for my site) voila, the changes were visible.
Thanks so much, this solution
Thanks so much, this solution works!
Initially, I renamed the entire theme and put it in a new directory, which also did the trick. It seems that the only option involves creating a new file or filepath.
I still don't quite understand why this is happening... I do use firebug and I'm certain the css was being served from the original file location, not a cache. I wonder if this should be posted as a bug?
After some more
After some more investigation, I've discovered that this issue is being cause by the Boost module. Despite having turned off caching, flushing the caches, and disabling the module, boost continued to served cached files. I fixed this by manually deleting the contents of the cache directory.
Yes, same thing happened to me
Not sure whether de-installing boost did it, or whether clearing all boost's caches did it. I LOVE boost, but it would be nice if it stopped serving from its cache when it was disabled.
In my case, the page was a view.
UPDATING This solved most of the problem, but not all. Additionally, I was using a widget that also seemed to import a stylesheet. When I turned off the widget, the cached stylesheet, with its URL from another site, disappeared.