In a multi-site installation where all sites share the same public:// directory the sites delete each other's less files during cron.
This happens in less_cron(). The less_cron() function assumes that all directories that do not match $less_dir are no good and deletes them.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ChrisSnyder’s picture

First attempt at patch to use unique base less path per site.

corey.aufang’s picture

What use case would you be in where you are using a multi-site setup with different databases but the same public:// directory?

Also, in 7.x-4.x this will most likely be a non-issue as I'm changing the way compiled files are stored, as we will now have full source maps support and will have no need for the sub folder structure matching the source file location.

I'm going to more closely follow the way that core expires old files, and there also will not be a sub folder in the public://less directory, so the issue you experienced in #1908886-6: Occasional issue: "...destination directory is not properly configured" should not crop up again.

corey.aufang’s picture

Assigned: ChrisSnyder » Unassigned
corey.aufang’s picture

Version: 7.x-3.x-dev » 7.x-4.x-dev
Status: Needs review » Closed (won't fix)

Less 7.x-4.x now expires compiled files in the same manner that Drupal Core flushes its CSS bundle caches: https://api.drupal.org/api/drupal/includes!common.inc/function/drupal_cl...

This should reduce the rampant rebuild that you were experiencing.

7.x-4.0 will be releasing soon.

If you have some time, please try 7.x-4.x-dev and let me know if it solves your problem.