I'm using less css on one of my sites. Sometimes it happens that the css file is not generated and the page is looking very ugly (of course). This happens sometimes when surfing on the site with no fixed reason - it happens especially at the first page view but also on the f.e. 45th pageview of the page.

Less CSS developer mode is off.

Comments

corey.aufang’s picture

Are you doing manual Drupal cache clears?

TripX’s picture

Sometimes when I need it, yes. But it can also happen when I didn't clear the cache for a while.

corey.aufang’s picture

I think this is an artifact of the file not being quite ready for the server to send it to the browser.

It is also a combination of various actions in Drupal that cause cache clears.

  • Enabling or disabling modules.
  • Changing theme settings.
TripX’s picture

When I clear the cache, then - in my eyes - it can happen that the files are not loaded correctly.
However, it happens during surfing on the page - f.e. on the 30th page request without activating, deactiving or changing modules and themes - which is a little bit confusing to me.
Do you think it is a general drupal problem or should I try to remove less-css and just use normal css-files?

blemmie’s picture

Same problem here. Seems random, happens even when I'm just surfing through the site without any made changes.

TripX’s picture

@blemmie: Do you think it is a less-css or general drupal problem?

blemmie’s picture

@TripX Can't figure it out. Found one drupal unrelated post solving it by adding the MIME type in IIS...
Maybe processing that runs too slow?

corey.aufang’s picture

I did a little digging and Drupal 7 has built in poor mans cron functionality.

Normally LESS for D7 doesn't clear the files on cron run buy looking at the cron_semaphore variable, but that only gets set in normal cron and apparently not through poor mans cron.

TripX’s picture

Hi corey.aufang - nice to hear that you had the time to get a little bit in this issue. Do you think you can fix this issue?

TripX’s picture

Any news about that? I have to have a solution :/

TripX’s picture

With regards to this issue I can tell you that I obsorved the problem. After every cache clear, it happens that the CSS files are not loaded.

raincloud’s picture

I have a similar problem, although in my case there is only 1 less file so far and this file is loaded as less and not css. I can see it in e.g. Firebug, there is views-styles.less instead of views-styles.css, so the page displays incorrectly. It behaves like the module was not enabled at all.

[Edit]Suddenly it's working now, perhaps after clicking "Flush less files" in less configuration, but not sure.

corey.aufang’s picture

A fix for this issue has been committed.

Please take a look at the dev tomorrow or clone the repo to your machine.

corey.aufang’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.