roborourke / wp-sass

Sass for WordPress
90 stars 24 forks source link

Stylesheets not fully loading #10

Open ericpedia opened 11 years ago

ericpedia commented 11 years ago

I am experiencing frequent problems with WP-Sass stylesheets not fully loading.

Here's what happens: I go to some page on my website, and the page will load with only some (or barely any) CSS styles applied. If I visit http://.../path/to/mystylesheet.css, it will show the full stylesheet just fine; but if I go into Inspector/Firebug and look the loaded Resources, it will show an incomplete version of the stylesheet—it will cut off somewhere randomly, in the middle of a line.

When this happens has no relation to when I have edited the SASS files.

Some notes:

Any idea what could be going on?

roborourke commented 11 years ago

Hi, if its cutting out halfway through a line then it might hitting a PHP error. My next step would be to look at the PHP error log for timeouts or wp-sass problems.

Would you say it's a big stylesheet?

Robert O'Rourke sanchothefat.com +44 7816 329424

noeltock commented 11 years ago

With LESS I've had this issue with a bad var or microsoft mixins. You should investigate to see where it cuts off and see if you're using a mixin, variable or otherwise at that location.

ericpedia commented 11 years ago

@sanchothefat There are two stylesheets—one is 41kb, and the other is 24kb. They both seem to have the problem.

As it turns out, there are a bunch of wp-sass-related errors in /usr/local/apache/logs/error_log:

[...10:39:18] [warn]  ... ] mod_fcgid: read data timeout in 40 seconds, referer: .../wp-sass-cache/sass_main.css?ver=3.5.1
[...10:39:22] [warn]  ... 746 graceful kill fail, sending SIGKILL
[...10:39:22] [error] ... 9] Premature end of script headers: index.php, referer: .../wp-sass-cache/sass_main.css?ver=3.5.1
[...14:19:55] [warn]  ...  mod_fcgid: read data timeout in 40 seconds, referer: .../wp-sass-cache/sass_main.css?ver=3.5.1
[...14:19:58] [error] ... ] Premature end of script headers: index.php, referer: .../wp-sass-cache/sass_main.css?ver=3.5.1
[...14:21:32] [warn]  ...  mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5
[...14:21:32] [warn]  ...  mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5, referer: .../wp-sass-cache/sass_main.css?ver=3.5.1
[...14:35:27] [warn]  ... 4] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: .../wp-sass-cache/sass_main.css?ver=3.5.1
[...14:35:27] [error] ... 64] Premature end of script headers: index.php, referer: .../wp-sass-cache/sass_main.css?ver=3.5.1
[...14:35:27] [warn]  ... ] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server

There is also a recurring error that I'm guessing is not related, in the error_log file in my theme folder:

[14-Apr-2013 17:07:19 UTC] PHP Fatal error:  Call to undefined function get_header() in /mytheme/index.php on line 17

@noeltock Where it cuts out doesn't seem to be related to the actual sass/scss code. It will cut off literally in the middle of a word, and then on refresh it will load fine.

roborourke commented 11 years ago

Thanks, that should help narrow it down.

The first fatal error looks like someone or some script trying to load your theme files directly. A check at the top of the theme files for ABSPATH being defined will stop those.

Robert O'Rourke sanchothefat.com +44 7816 329424