Closed (duplicate)
Project:
Drupal core
Version:
6.24
Component:
base system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Feb 2012 at 05:20 UTC
Updated:
25 Feb 2012 at 01:38 UTC
When upgrading core from D5 to D6 the process works great in 6.22 and 6.23, but when using 6.24 the site is riddled with errors after the upgrade. The only theme I have enabled is garland, and it's using the default settings. (I've tested it multiple times.)
warning: Invalid argument supplied for foreach() in drupal-6.24/includes/theme.inc on line 497.
warning: Invalid argument supplied for foreach() in drupal-6.24/includes/theme.inc on line 502.
warning: Invalid argument supplied for foreach() in drupal-6.24/includes/theme.inc on line 497.
warning: Invalid argument supplied for foreach() in drupal-6.24/includes/theme.inc on line 502.
warning: Invalid argument supplied for foreach() in drupal-6.24/includes/theme.inc on line 497.
warning: Invalid argument supplied for foreach() in drupal-6.24/includes/theme.inc on line 502.
warning: Invalid argument supplied for foreach() in drupal-6.24/includes/theme.inc on line 497.
warning: Invalid argument supplied for foreach() in drupal-6.24/includes/theme.inc on line 502.
warning: Invalid argument supplied for foreach() in drupal-6.24/includes/theme.inc on line 497.
warning: Invalid argument supplied for foreach() in drupal-6.24/includes/theme.inc on line 502.
warning: array_map() [function.array-map]: Argument #2 should be an array in drupal-6.24/modules/system/system.module on line 1046.
warning: array_keys() expects parameter 1 to be array, null given in drupal-6.24/includes/theme.inc on line 1833.
warning: Invalid argument supplied for foreach() in drupal-6.24/includes/theme.inc on line 1833.
in D5 there was one entry in the system table for each theme, as follows:
+-------+------------+-----------------------------------+
| type | name | filename |
+-------+------------+-----------------------------------+
| theme | bluemarine | themes/bluemarine/page.tpl.php |
| theme | chameleon | themes/chameleon/chameleon.theme |
| theme | marvin | themes/chameleon/marvin/style.css |
| theme | minnelli | themes/garland/minnelli/style.css |
| theme | garland | themes/garland/page.tpl.php |
| theme | pushbutton | themes/pushbutton/page.tpl.php |
+-------+------------+-----------------------------------+
After an upgrade from D5 to D6 there are additional entries in the system table, an .info file has been added for each theme.
+-------+------------+---------------------------------------+
| type | name | filename |
+-------+------------+---------------------------------------+
| theme | bluemarine | themes/bluemarine/page.tpl.php |
| theme | bluemarine | themes/bluemarine/bluemarine.info |
| theme | chameleon | themes/chameleon/chameleon.theme |
| theme | chameleon | themes/chameleon/chameleon.info |
| theme | garland | themes/garland/page.tpl.php |
| theme | garland | themes/garland/garland.info |
| theme | marvin | themes/chameleon/marvin/style.css |
| theme | marvin | themes/chameleon/marvin/marvin.info |
| theme | minnelli | themes/garland/minnelli/style.css |
| theme | minnelli | themes/garland/minnelli/minnelli.info |
| theme | pushbutton | themes/pushbutton/page.tpl.php |
| theme | pushbutton | themes/pushbutton/pushbutton.info |
+-------+------------+---------------------------------------+
in 6.24 when the list_themes function is called, it retrieves a "theme" for every theme entry in the system table, meaning half the time it's got a style sheet or a page.tpl.php file instead of an .info file, and throws these errors.
Comments
Comment #0.0
jenlamptonmore information
Comment #0.1
jenlamptonclarify now
Comment #0.2
jenlamptonbetter sql
Comment #1
jenlamptonThe following cleanup on the system table prevented the errors:
We should probably add this as an update hook.
Comment #2
webchickI think this is a duplicate of #1425868: Duplicate entry of themes primary key in systems table of Drupal 6.24 (using Drush or Ægir), which means it should be fixed in 6.25 (Wednesday).
Comment #3
jenlamptonYeah, the patch from #1425868: Duplicate entry of themes primary key in systems table of Drupal 6.24 (using Drush or Ægir) solved the D5 upgrade issues too, thanks for pointing me at that :)
Comment #3.0
jenlamptonad D6 database table