In attempting to debug why #950034-37: Using the same source for main/secondary with a custom menu doesn't work suddenly worked without any code change, I performed before/after database dumps and ran a diff on them. Yielding lots of surprises.

Note that, next to applying and reverting the patch from that issue, I also flushed all caches, ran update.php, put the site offline and back online, and saved theme settings in between.

Summary:

  1. {date_format_type} label is overwritten with localized string when flushing caches or running updates.
  2. {menu_router} and {menu_links} contain language-specific URLs when using url() in 'description' of hook_menu().
  3. {system} contains many completely obsolete module records, which should have been cleaned up in the upgrade paths of D6 and D7. (i.e., all modules that have been moved into core)
  4. system.module in {system} had the bootstrap = 1 flag for some reason after upgrading to D7.
  5. {system} contains unnecessary testing themes.
  6. default_theme can be actively used, despite being disabled in {system}.
  7. {variable} contains many orphan entries.
  8. Theme settings not contained in {variable} after upgrading to D7.
@@ -2161,7 +2161,7 @@ CREATE TABLE IF NOT EXISTS `date_format_

 INSERT INTO `date_format_type` VALUES
 ('long', 'Long', '1'),
-('medium', 'Medium', '1'),
+('medium', 'Mittel', '1'),
 ('short', 'Short', '1');

My site also has the German language installed, but it is not the default language. But it's possible that I flushed caches while being in German context.

@@ -19725,7 +20188,7 @@ INSERT INTO `menu_router` VALUES

-('devel/settings', ..., 'Devel settings', 't', '', '6', 'Helper functions, pages, and blocks to assist Drupal developers. The devel blocks can be managed via the <a href="/en/admin/structure/block">block administration</a> page.', ...),
+('devel/settings', ..., 'Devel settings', 't', '', '6', 'Helper functions, pages, and blocks to assist Drupal developers. The devel blocks can be managed via the <a href="/de/admin/structure/block">block administration</a> page.', ...),

@@ -19356,27 +19818,28 @@ INSERT INTO `menu_links` VALUES
-('management', '5620', '5353', 'admin/config/development/devel', ..., 'a:1:{s:10:"attributes";a:1:{s:5:"title";s:171:"Helper functions, pages, and blocks to assist Drupal developers. The devel blocks can be managed via the <a href="/en/admin/structure/block">block administration</a> page.";}}', 'system', ...),
+('management', '5620', '5353', 'admin/config/development/devel', ..., 'a:1:{s:10:"attributes";a:1:{s:5:"title";s:171:"Helper functions, pages, and blocks to assist Drupal developers. The devel blocks can be managed via the <a href="/de/admin/structure/block">block administration</a> page.";}}', 'system', ...),

-('devel', '5596', '0', 'devel/settings', ..., 'a:1:{s:10:"attributes";a:1:{s:5:"title";s:171:"Helper functions, pages, and blocks to assist Drupal developers. The devel blocks can be managed via the <a href="/en/admin/structure/block">block administration</a> page.";}}', 'system', ...),
+('devel', '5596', '0', 'devel/settings', ..., 'a:1:{s:10:"attributes";a:1:{s:5:"title";s:171:"Helper functions, pages, and blocks to assist Drupal developers. The devel blocks can be managed via the <a href="/de/admin/structure/block">block administration</a> page.";}}', 'system', ...),

Very interesting -- using url() for 'description' in hook_menu() is an edge-case that we probably didn't consider yet...

@@ -82118,7 +82636,7 @@ CREATE TABLE IF NOT EXISTS `system` (
 INSERT INTO `system` VALUES

 ('sites/all/modules/autolocale/autolocale.module', 'autolocale', 'module', '0', '0', 0, '0', 'a:8:{s:4:"name";s:10:"Autolocale";...;s:11:"5.x-1.x-dev";...', 'Automatically imports interface translations.'),
 ('sites/all/modules/htmlcorrector/htmlcorrector.module', 'htmlcorrector', 'module', '0', '0', 0, '0', 'a:8:{s:4:"name";s:14:"HTML Corrector";...;s:11:"5.x-1.x-dev";...', 'Ensures all HTML in user-submitted content is valid when output on the page.'),

-('modules/system/system.module', 'system', 'module', '1', '1', 7071, '0', 'a:13:{...;s:9:"bootstrap";i:0;}', 'Handles general site configuration for administrators.'),
+('modules/system/system.module', 'system', 'module', '1', '0', 7071, '0', 'a:13:{...;s:9:"bootstrap";i:0;}', 'Handles general site configuration for administrators.'),
  1. autolocale and htmlcorrector (and others) from D5 are still in D7's {system} table and never removed. As with #1228488-13: Drupal 7 text module update (added during beta) runs on sites that have D6 CCK text module installed, I think those records should have been removed way back in a update_fix_d6_requirements()...
  2. For some very odd reason, the 'bootstrap' flag was changed to '1' for System module after upgrading to D7, and at some point during my cache-flushing and update-running ride changed back to '0'. However, it shouldn't have been changed to '1' at any point at all...?
@@ -82337,7 +82855,7 @@ INSERT INTO `system` VALUES

 ('themes/tests/test_theme/test_theme.info', 'test_theme', 'theme', '0', '0', ...
 ('themes/tests/update_test_basetheme/update_test_basetheme.info', 'update_test_basetheme', 'theme', '0', '0', ...
 ('themes/tests/update_test_subtheme/update_test_subtheme.info', 'update_test_subtheme', 'theme', '0', '0', ...

Those shouldn't exist, see #953336: Contributed modules are not able to test theme-related functionality

@@ -82337,7 +82855,7 @@ INSERT INTO `system` VALUES

-('sites/all/themes/ulmv2/ulmv2.info', 'ulmv2', 'theme', '0', '0', -1, '0', ...),
+('sites/all/themes/ulmv2/ulmv2.info', 'ulmv2', 'theme', '1', '0', -1, '0', ...),

This theme was the default theme and the site was using it the entire time, but apparently it was not marked as enabled in {system}. We're still allowing and supporting this weird inconsistency, and it's no surprise that users are running into all kind of bugs, because their site is actively using a theme that is not enabled.

Note that I did a mistake when upgrading to D7 and so the disabled value is not really a bug. The update.php case should have been fixed through #305653: Themes disabled during update, but we still don't have any sanity check in the theme system that prevents one from actively using a disabled theme.

Closely related for D8: #1067408: Themes do not have an installation status

@@ -83486,9 +84004,10 @@ INSERT INTO `variable` VALUES

 ('i18n_drupal6_update', 'b:1;'),

Lots of lots of lots of orphan variables in a D5->D6->D7 site. :(

We really need a solid system like #145164: DX: Use hook_variable_info to declare variables and defaults to reliably identify orphans...

@@ -83486,9 +84004,10 @@ INSERT INTO `variable` VALUES

+('theme_ulmv2_settings', 'a:15:{s:11:"toggle_logo";i:1;s:11:"toggle_name";i:1;s:13:"toggle_slogan";i:0;s:24:"toggle_node_user_picture";i:0;s:27:"toggle_comment_user_picture";i:0;s:32:"toggle_comment_user_verification";i:1;s:14:"toggle_favicon";i:1;s:16:"toggle_main_menu";i:1;s:21:"toggle_secondary_menu";i:1;s:12:"default_logo";i:1;s:9:"logo_path";s:0:"";s:11:"logo_upload";s:0:"";s:15:"default_favicon";i:1;s:12:"favicon_path";s:0:"";s:14:"favicon_upload";s:0:"";}');

So theme settings are entirely missing when upgrading to D7...?

#563708: Improve theme_get_setting() and make custom theme settings a true form_alter performed some related changes, but I'm not sure whether it is the cause. Searching the queue yielded that issue only, but it doesn't really look like it changed anything with regard to variable names, or saving or deletion of theme setting variables.

CommentFileSizeAuthor
d7-flush-cashes.diff12.68 KBsun
Support from Acquia helps fund testing for Drupal Acquia logo