=== modified file 'modules/block/block.module'
--- modules/block/block.module	2009-05-28 16:44:05 +0000
+++ modules/block/block.module	2009-05-31 05:23:38 +0000
@@ -299,6 +299,7 @@ function _block_rehash() {
   $blocks = array();
   // Valid region names for the theme.
   $regions = system_region_list($theme_key);
+  $themes = list_themes();
 
   foreach (module_implements('block_list') as $module) {
     $module_blocks = module_invoke($module, 'block_list');
@@ -338,6 +339,12 @@ function _block_rehash() {
           else {
             $old_blocks[$module][$delta]['region'] = $old_blocks[$module][$delta]['status'] ? $old_blocks[$module][$delta]['region'] : BLOCK_REGION_NONE;
           }
+          // Disabled themes still show their content block, otherwise the
+          // block admin form does not appear.
+          if (!$themes[$theme_key]->status && $module == 'system' && $delta == 'main') {
+            $old_blocks[$module][$delta]['region'] = 'content';
+          }
+
           // Add this block to the list of blocks we return.
           $blocks[] = $old_blocks[$module][$delta];
           // Remove this block from the list of blocks to be deleted.
@@ -640,7 +647,28 @@ function _block_load_blocks() {
     $block->page_match = $page_match;
     $blocks[$block->region]["{$block->module}_{$block->delta}"] = $block;
   }
-
+  $themes = list_themes();
+  // Disabled themes still need to show their content block, otherwise the
+  // block admin form won't appear.
+  if (!$themes[$theme_key]->status && !isset($blocks['content']['system_main'])) {
+    $blocks['content']['system_main'] = (object) array(
+      'bid' => 1,
+      'module' => 'system',
+      'delta' => 'main',
+      'theme' => $theme_key,
+      'status' => 1,
+      'weight' => 0,
+      'region' => 'content',
+      'custom' => 0,
+      'visibility' => 0,
+      'pages' => '',
+      'title' => '',
+      'cache' => BLOCK_NO_CACHE,
+      'enabled' => TRUE,
+      'page_match' => TRUE,
+    );
+  }
+    
   return $blocks;
 }
 

