I've just encountered the maximum number of stylesheets in IE "feature". After some hunting I came across turning on "Optimize CSS files" in admin/settings/performance, so I tried that.
Unfortunately, immediately after doing so I get this error message in all browsers as soon as I try and load any Drupal page:
Connection Interrupted
The document contains no data.
The network link was interrupted while negotiating a connection. Please try again.
That includes the admin/settings/performance page that's returned after hitting Submit, and is for all browsers now, not just IE.
Usually I can get the original page to come back up in the browser where I can switch it back, but if that doesn't work for whatever reason I have to restore the database. As soon as I reset "Optimise CSS files" back to disabled, the site works fine (except IE, of course)
I'm also using/working on a Zen subtheme.
Ideas, anyone?
Thanks
Tim
Comments
IE has a limit of 32 external
IE has a limit of 32 external css files. If you install several modules and each one of them has it's own css files, it's not so difficult to reach this number. So, you have to decrease the number of your css files. So, using firebug, take a note of all the css files in your page.
The first step is to check you zen subtheme and try to combine all your css files in one file. If this isn't enough, install and use the great stylestripper module http://drupal.org/project/stylestripper. With this, you can disable selected css files that aren't critical and this way decrease the total number of external css files to less than 32. Of course, if you install more modules in the future, it's very possible that you'll face the same problem again.
Thanks for the tip on
Thanks for the tip on stylestripper - should help keep it under 32 there in addition to manually combining.
Anyone though have any ideas why turning on CSS optimization would cause the entire site to effectively crash?
(I probably should have chosen a better subject...)
I'm having the same problem.
I'm having the same problem. When enabling "optimize CSS" my site crahes and gives me a "Internet Explorer cannot display the webpage". Same when trying to enable with Safari on Mac.
I have to go into SQL and change the variable in order to get the site back online again.
When testing on localhost (MAMP) CSS optimize works like a charm. But when running on PROD server (WAMP) it's back to error.
Deleting folders JS and CSS from /files, clearing the cache didn't help.
I really need the option to put my CSS's in one file, due to heavy load on server. The JS option does work, and I can't figure it out...
Could someone help me into the right direction?
Where in the database are
Where in the database are your finding the variable to delete?
In the variables table, look
In the variables table, look for
preprocess_js and preprocess_css
On has a value of: s:1:"1";
so when my site crashes due to me turning on the css preprocessing, I need to change the value to:
preprocess_css s:1:"0";I went into my database and
EDIT: Nevermind, found the preprocess_css row on page 2 of the variable table. Didn't see the pager in phpmyadmin initially. Thanks for your instructions.
WOW!!!!
Great! Your solution solved a big issue for me. Thanks a lot.
Alessandro Bonelli
I'm having the same issue too.
I posted it in the zen issue queue.
http://drupal.org/node/448870
corrections, suggested work-around
Is the files directory writeable? Maybe its a permissions issue.
FYI its a max of 30 linked stylesheets, http://support.microsoft.com/kb/262161, not 32 external stylesheets as the fist poster ascertains.
I am using this module during development to allow me to load unlimited stylesheets while building themes, works great for dev:
http://drupal.org/project/unlimited_css
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
yes, it is. the JS
yes, it is. the JS compressing works fine, it's just compressing css that causes the issue. I also checked localhost on my mac and it seems to work fine, so does my remote hosting on a linux server. Localhost on the PC is the only one that doesn't work.
In
In http://drupal.org/node/448870, I posted a solution that works for me, that is, stripping out all occurances of aphostrophy symbols (') from any comments in your css, such as don't to dont. Just replace all from a notepad. Never mind the grammar:) Perhaps that can help you too.
love, light n laughter
oops wrong reply button
accidental double post. threaded forum styles are not cool :/
Tried removing all apostrophes
It still crashes, and I have less than 30 stylesheets :-/
Im having this issue as well
Im having this issue as well using WAMP
and a zen subtheme
Tried all the suggestions. removing all apostrophes from css,
permissions on files and css and js folders etc.
JS is being compressed, so i don't think its a file system thing.
but i get the error:
Connection Interrupted
The document contains no data.
The network link was interrupted while negotiating a connection. Please try again.
Same here
Using WAMP, fewer than 20 stylesheets, removed all apostrophes, rebuilt the theme registry, and it still crashes.
Hope this gets solved soon.
Same problem, Apache crashes
I have a dev site running locally on a Vista machine with Apache 2.2.11, PHP 5.29-2, and a Zen subtheme. After I enable the "Optimise CSS files" option and save the configuration I get the "Connection Interrupted" page because Apache crashes. Vista gives me the following information:
Problem signature:
Problem Event Name: APPCRASH
Application Name: httpd.exe
Application Version: 2.2.11.0
Application Timestamp: 493f5d44
Fault Module Name: php5ts.dll
Fault Module Version: 5.2.9.9
Fault Module Timestamp: 49dda255
Exception Code: c00000fd
Exception Offset: 00151eef
OS Version: 6.0.6001.2.1.0.256.1
Locale ID: 1033
Additional Information 1: fd00
Additional Information 2: ea6f5fe8924aaa756324d57f87834160
Additional Information 3: fd00
Additional Information 4: ea6f5fe8924aaa756324d57f87834160
Alex
Try this workaround, worked
Try this workaround, worked for me: http://drupal.org/node/331915#comment-1357688
Thank you lrobeson!
Thank you lrobeson! http://drupal.org/node/331915#comment-1357688 fixed my complete Drupal crash when enabling CSS optimization too.
I am using Drupal 6.16 and Zen 6.x-1.1 with CTI Flex 6.x-1.1 on Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.9.
I have never encountered such problem before and wonder if it has something to do with running XAMPP on Windows 2008 Server.
CSS crash is server dependent?
I found out that, the CSS optimization crash bug on our Drupal 6.16 site is specific to what LAMP/WAMP setup we are using.
It does not crash on the following Linux setup provided by site5.com:
Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7a Phusion_Passenger/2.2.11 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635It does crash on the following Windows 2008 Server plus XAMPP setup:
Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.9I wonder if the CSS optimization bug may be a symptom for a deeper problem.
(Cross-post from #331915: Performance: When enable optimization for css and javascript ... site goes down instant!)
Confirm
I can confirm this theory:
After changing the server, my CSS crashes too with CSS optimisation enabled.
It crashes with:
Server: Apache/2.2.8 (Ubuntu) mod_jk/1.2.25 mod_python/3.3.1 Python/2.5.2 PHP/5.2.4-2ubuntu5.10 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g mod_perl/2.0.3 Perl/v5.8.8
PHP : 5.2.4-2ubuntu5.10
It doesn't crash with:
Server: Apache/2.2.8 (Ubuntu) mod_python/3.3.1 Python/2.5.2 PHP/5.2.9-0.dotdeb.1 with Suhosin-Patch
PHP: 5.2.9-0.dotdeb.1
Found the issue
[edit] Nevermind!