urgent; Theme CSS not loading on blocks administration page

Bartezz - January 7, 2009 - 10:08

Hi,

I'm using D5.14 and have the following snipplet in my template.php;

function customtheme_regions() {
  return array(
'main_navigation' => t('main navigation'),
'header_image' => t('header image'),
'content' => t('content'),
'subbody' => t('sub body')
  );
}

function _phptemplate_variables($hook, $vars) {

  #   Alter default CSS settings
 

$css = drupal_add_css();

unset($css['all']['module']['modules/system/system.css']);
unset($css['all']['module']['modules/system/defaults.css']);
unset($css['all']['module']['modules/node/node.css']);
unset($css['all']['module']['modules/user/user.css']);
unset($css['all']['module']['sites/all/modules/cck/content.css']);
unset($css['all']['module']['sites/all/modules/date/date.css']);
unset($css['all']['module']['sites/all/modules/fckeditor/fckeditor.css']);
unset($css['all']['theme']['sites/all/themes/customtheme/style.css']);

drupal_add_css(drupal_get_path('theme', 'customtheme') .'/css/default.css', 'theme', 'screen');

if($GLOBALS['user']->uid) {
drupal_add_css(drupal_get_path('theme', 'customtheme') .'/css/admin.css', 'theme', 'screen');
}
$vars['styles'] = drupal_get_css($css);
.....

Now this works on every page except for admin/build/block. Although the css I'm unsetting are being unset it's not adding the css from customtheme.
Now for the completely weird part, if I remove function customtheme_regions() or change the function name customtheme_regions() to lingo_regions() it all works perfectly and it loads the css from customtheme. Yet then I can't set blocks for the regions ofcourse.... :S

Is there something I might be messing up bigtime???

Cheers

 
 

Drupal is a registered trademark of Dries Buytaert.