Note: This problem happens with a Shared hosting server using Nginx.
I recently launched a website using the latest version of Drupal 7.24. After launching, I went to the Admin page at sitename.com/admin/config/development/performance and checked the box to Aggregate and Compress CSS files. All my site's CSS styling promptly disappeared. So, of course, I disabled this checkbox.
I don't know what's causing this problem. Could it be the new .htaccess files that are included with the new Drupal 7.24? I understand that the new .htaccess files in the sites/default/files/css and /tmp directories is helpful to prevent hacking.
Anyone else have problems with CSS styling disappearing?
Update: Feb. 20, 2014
This post on Drupal.org may be helpful for some: https://drupal.org/node/1335366
After hours of testing, I found the solution for me:
My web host tech support confirmed that they are running Nginx on my shared hosting server at Hostgator.com. However, my situation is a bit different than jgeist
, I didn't have problems with IE but with Firefox and Chrome.
I was able to solve the problem by removing the new .htaccess files recommended by Drupal 7.24 for the files/css and /tmp directories
- I also removed the .htaccess file in sites/default/files and then my site styling came back when "Aggregate and Compress CSS" files was turned on.
- "Compress Cached files" is also turned on.
- I used the root .htaccess file from Drupal 7.24 AS IS
Note: When clearing the browser cache using the browser settings, you will be automatically logged out of Drupal's admin panel.
I'm using these settings:
1. "Aggregate and compress CSS files" is checked.
3. "Compress cached pages" is also checked.
I removed the new .htaccess files from sites/default/files and /tmp recommended by Drupal 7.24
I am using the root .htaccess file that comes with Drupal 7.24 AS IS.
I hope someone else finds this helpful. Please leave your comments below:
Here is another resource that might be helpful: