? theme-allow-missing-css-e.patch Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.773 diff -u -p -r1.773 common.inc --- includes/common.inc 24 Jun 2008 22:09:52 -0000 1.773 +++ includes/common.inc 1 Jul 2008 15:12:20 -0000 @@ -1728,19 +1728,22 @@ function drupal_get_css($css = NULL) { unset($types[$type][$file]); continue; } - if (!$preprocess || !($is_writable && $preprocess_css)) { - // If a CSS file is not to be preprocessed and it's a module CSS file, it needs to *always* appear at the *top*, - // regardless of whether preprocessing is on or off. - if (!$preprocess && $type == 'module') { - $no_module_preprocess .= '' . "\n"; - } - // If a CSS file is not to be preprocessed and it's a theme CSS file, it needs to *always* appear at the *bottom*, - // regardless of whether preprocessing is on or off. - else if (!$preprocess && $type == 'theme') { - $no_theme_preprocess .= '' . "\n"; - } - else { - $output .= '' . "\n"; + // Only include the stylesheet if it exists. + if (file_exists($file)) { + if (!$preprocess || !($is_writable && $preprocess_css)) { + // If a CSS file is not to be preprocessed and it's a module CSS file, it needs to *always* appear at the *top*, + // regardless of whether preprocessing is on or off. + if (!$preprocess && $type == 'module') { + $no_module_preprocess .= '' . "\n"; + } + // If a CSS file is not to be preprocessed and it's a theme CSS file, it needs to *always* appear at the *bottom*, + // regardless of whether preprocessing is on or off. + else if (!$preprocess && $type == 'theme') { + $no_theme_preprocess .= '' . "\n"; + } + else { + $output .= '' . "\n"; + } } } } Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.428 diff -u -p -r1.428 theme.inc --- includes/theme.inc 25 Jun 2008 09:12:24 -0000 1.428 +++ includes/theme.inc 1 Jul 2008 15:12:20 -0000 @@ -449,9 +449,7 @@ function list_themes($refresh = FALSE) { foreach ($themes as $theme) { foreach ($theme->info['stylesheets'] as $media => $stylesheets) { foreach ($stylesheets as $stylesheet => $path) { - if (file_exists($path)) { - $theme->stylesheets[$media][$stylesheet] = $path; - } + $theme->stylesheets[$media][$stylesheet] = $path; } } foreach ($theme->info['scripts'] as $script => $path) {