diff --git includes/common.inc includes/common.inc index 651eb6a..330bc64 100644 --- includes/common.inc +++ includes/common.inc @@ -3334,6 +3334,7 @@ function drupal_build_css_cache($css) { } if (empty($uri) || !file_exists($uri)) { +drupal_set_message("building css cache($uri)"); // Build aggregate CSS file. foreach ($css as $stylesheet) { // Only 'file' stylesheets can be aggregated. @@ -3369,9 +3370,12 @@ function drupal_build_css_cache($css) { // Create the css/ within the files folder. $csspath = 'public://css'; $uri = $csspath . '/' . $filename; +drupal_set_message("saving file uri($uri) (after 10 second sleep)"); +sleep(10); // Create the CSS file. file_prepare_directory($csspath, FILE_CREATE_DIRECTORY); if (!file_exists($uri) && !file_unmanaged_save_data($data, $uri, FILE_EXISTS_REPLACE)) { +drupal_set_message("save failed."); return FALSE; } // If CSS gzip compression is enabled, clean URLs are enabled (which means @@ -3379,12 +3383,15 @@ function drupal_build_css_cache($css) { // create a gzipped version of this file. This file is served conditionally // to browsers that accept gzip using .htaccess rules. if (variable_get('css_gzip_compression', TRUE) && variable_get('clean_url', 0) && extension_loaded('zlib')) { +drupal_set_message("saving gzip version of file."); if (!file_exists($uri . '.gz') && !file_unmanaged_save_data(gzencode($data, 9, FORCE_GZIP), $uri . '.gz', FILE_EXISTS_REPLACE)) { +drupal_set_message("gzip save failed."); return FALSE; } } // Save the updated map. $map[$key] = $uri; +drupal_set_message('updating map: variable_set(drupal_css_cache_files)'); variable_set('drupal_css_cache_files', $map); } return $uri;