Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS and JS being cut off/truncated, seemingly randomly #284

Open
MaffooBristol opened this issue Aug 2, 2018 · 0 comments
Open

CSS and JS being cut off/truncated, seemingly randomly #284

MaffooBristol opened this issue Aug 2, 2018 · 0 comments

Comments

@MaffooBristol
Copy link

MaffooBristol commented Aug 2, 2018

Hi,

I have a Drupal 8 site running on my Mac locally. The theme's CSS is being compiled using Gulp.

Often, after making a change and refreshing the page, the CSS will be corrupted, with a few lines stripped off the end. Depending on the exact makeup of the file, this could go from having one thing being unstyled, to completely breaking all styling. Sometimes it rectifies itself by hard refreshing multiple times (or opening the CSS file directly in the browser and hard refreshing that)... sometimes it's fixed by a cache clear. Sometimes it's fixed by just force rebuilding the file.

I tested it out by running wc -c style.css && curl -sI http://mysite.local/blah/style.css | grep -i Content-Length, which when working fine would result in:

   44381 css/style.css
Content-Length: 44381

But sometimes would come out with a mismatch:

   44120 css/style.css
Content-Length: 43996

In the Chrome network tab, it states that the CSS file is returning a ERR_EMPTY_RESPONSE.

The two things I tried were to set sendfile off; in nginx.conf, and to set expires 0; in drupal.conf for the static files directive. I can't think of anything else to troubleshoot- could you give some guidance please?

Thanks in advance,
Matt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant