Hi all, I'm a Drupal newbie trying to teach myself how to run the system in preparation for some projects I'll be working on in the future.

I have a local installation of Drupal on my MacBook running under MAMP. Last night, I tried to upgrade from version 6 to version 6.3. I read the instructions in the update file, and thought I was doing everything just fine. When I ran upgrade.php, the system didn't report any errors. However, when I went to administer the site, none of the themes would show, and I saw the following errors at the top of my page:

* warning: array_map() [function.array-map]: Argument #2 should be an array in /Applications/MAMP/htdocs/drupal/modules/system/system.module on line 975.
* warning: array_keys() [function.array-keys]: The first argument should be an array in /Applications/MAMP/htdocs/drupal/includes/theme.inc on line 1720.
* warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/drupal/includes/theme.inc on line 1720.

What do these mean, and is this something that can be easily fixed without a fresh installation? Thanks!

Comments

dave reid’s picture

After upgrading to 6.4, I found that somehow all my themes had been 'disabled' and I had to re-enable via checkboxes the ones I was using in admin/build/themes. Try checking that out and see if it's the same problem.

mray’s picture

That did it for me! - I guess I would have searched for a couple of extra hours without that hint!

stone_d’s picture

hi there,

i got the same error, but the fix to go directly to the admin/build/themes ends up in this error-messages:

Warning: INSERT command denied to user 'dbo257905586'@'212.227.118.40' for table 'bs_watchdog' query: INSERT INTO bs_watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'page not found', 'admin/build/themes', 'N;', 4, '', 'http://www.bettinascheibe.com/drupal/?q=admin/build/themes', '', '78.43.106.91', 1223482708) in /homepages/35/d33505019/htdocs/bettinascheibe/drupal/includes/database.mysqli.inc on line 128

Warning: array_map() [function.array-map]: Argument #2 should be an array in /homepages/35/d33505019/htdocs/bettinascheibe/drupal/modules/system/system.module on line 975

Warning: array_keys() [function.array-keys]: The first argument should be an array in /homepages/35/d33505019/htdocs/bettinascheibe/drupal/includes/theme.inc on line 1720

Warning: Invalid argument supplied for foreach() in /homepages/35/d33505019/htdocs/bettinascheibe/drupal/includes/theme.inc on line 1720

Warning: INSERT command denied to user 'dbo257905586'@'212.227.118.40' for table 'bs_system' query: INSERT INTO bs_system (name, owner, info, type, filename, status, throttle, bootstrap) VALUES ('reisetrolle', 'themes/engines/phptemplate/phptemplate.engine', 'a:13:{s:4:\"name\";s:6:\"bettys\";s:11:\"description\";s:31:\"Theme für die Reisetrolle.\";s:7:\"version\";s:3:\"6.3\";s:4:\"core\";s:3:\"6.x\";s:6:\"engine\";s:11:\"phptemplate\";s:11:\"stylesheets\";a:2:{s:3:\"all\";a:1:{s:9:\"style.css\";s:22:\"themes/betty/style.css\";}s:5:\"print\";a:1:{s:9:\"print.css\";s:22:\"themes/betty/print.css\";}}s:7:\"project\";s:6:\"drupal\";s:9:\"datestamp\";s:10:\"1215640509\";s:7:\"regions\";a:5:{s:4:\"left\";s:12:\"Left sidebar\" in /homepages/35/d33505019/htdocs/bettinascheibe/drupal/includes/database.mysqli.inc on line 128

Warning: INSERT command denied to user 'dbo257905586'@'212.227.118.40' for table 'bs_system' query: INSERT INTO bs_system (name, owner, info, type, filename, status, throttle, bootstrap) VALUES ('pushbutton', 'themes/engines/phptemplate/phptemplate.engine', 'a:13:{s:4:\"name\";s:10:\"Pushbutton\";s:11:\"description\";s:52:\"Tabled, multi-column theme in blue and orange tones.\";s:7:\"version\";s:3:\"6.4\";s:4:\"core\";s:3:\"6.x\";s:6:\"engine\";s:11:\"phptemplate\";s:7:\"project\";s:6:\"drupal\";s:9:\"datestamp\";s:10:\"1218672610\";s:7:\"regions\";a:5:{s:4:\"left\";s:12:\"Left sidebar\";s:5:\"right\";s:13:\"Right sidebar\";s:7:\"content\";s:7:\"Content\";s:6:\"header\";s:6:\"Header\";s:6:\"footer\";s:6:\"Footer\";}s:8 in /homepages/35/d33505019/htdocs/bettinascheibe/drupal/includes/database.mysqli.inc on line 128

Warning: INSERT command denied to user 'dbo257905586'@'212.227.118.40' for table 'bs_system' query: INSERT INTO bs_system (name, owner, info, type, filename, status, throttle, bootstrap) VALUES ('minnelli', 'themes/engines/phptemplate/phptemplate.engine', 'a:14:{s:4:\"name\";s:8:\"Minnelli\";s:11:\"description\";s:56:\"Tableless, recolorable, multi-column, fixed width theme.\";s:7:\"version\";s:3:\"6.4\";s:4:\"core\";s:3:\"6.x\";s:10:\"base theme\";s:7:\"garland\";s:11:\"stylesheets\";a:1:{s:3:\"all\";a:1:{s:12:\"minnelli.css\";s:36:\"themes/garland/minnelli/minnelli.css\";}}s:7:\"project\";s:6:\"drupal\";s:9:\"datestamp\";s:10:\"1218672610\";s:7:\"regions\";a:5:{s:4:\"left\";s:12:\"Left sidebar\";s:5:\"right\";s:13:\"Right sidebar\";s:7: in /homepages/35/d33505019/htdocs/bettinascheibe/drupal/includes/database.mysqli.inc on line 128

Warning: INSERT command denied to user 'dbo257905586'@'212.227.118.40' for table 'bs_system' query: INSERT INTO bs_system (name, owner, info, type, filename, status, throttle, bootstrap) VALUES ('garland', 'themes/engines/phptemplate/phptemplate.engine', 'a:13:{s:4:\"name\";s:7:\"Garland\";s:11:\"description\";s:66:\"Tableless, recolorable, multi-column, fluid width theme (default).\";s:7:\"version\";s:3:\"6.4\";s:4:\"core\";s:3:\"6.x\";s:6:\"engine\";s:11:\"phptemplate\";s:11:\"stylesheets\";a:2:{s:3:\"all\";a:1:{s:9:\"style.css\";s:24:\"themes/garland/style.css\";}s:5:\"print\";a:1:{s:9:\"print.css\";s:24:\"themes/garland/print.css\";}}s:7:\"project\";s:6:\"drupal\";s:9:\"datestamp\";s:10:\"1218672610\";s:7:\"regions\";a:5:{s:4:\"left\" in /homepages/35/d33505019/htdocs/bettinascheibe/drupal/includes/database.mysqli.inc on line 128

Warning: INSERT command denied to user 'dbo257905586'@'212.227.118.40' for table 'bs_system' query: INSERT INTO bs_system (name, owner, info, type, filename, status, throttle, bootstrap) VALUES ('marvin', '', 'a:13:{s:4:\"name\";s:6:\"Marvin\";s:11:\"description\";s:31:\"Boxy tabled theme in all grays.\";s:7:\"regions\";a:2:{s:4:\"left\";s:12:\"Left sidebar\";s:5:\"right\";s:13:\"Right sidebar\";}s:7:\"version\";s:3:\"6.4\";s:4:\"core\";s:3:\"6.x\";s:10:\"base theme\";s:9:\"chameleon\";s:7:\"project\";s:6:\"drupal\";s:9:\"datestamp\";s:10:\"1218672610\";s:8:\"features\";a:10:{i:0;s:20:\"comment_user_picture\";i:1;s:7:\"favicon\";i:2;s:7:\"mission\";i:3;s:4:\"logo\";i:4;s:4:\"name\";i:5;s:17:\"node_user_picture\&qu in /homepages/35/d33505019/htdocs/bettinascheibe/drupal/includes/database.mysqli.inc on line 128

Warning: INSERT command denied to user 'dbo257905586'@'212.227.118.40' for table 'bs_system' query: INSERT INTO bs_system (name, owner, info, type, filename, status, throttle, bootstrap) VALUES ('chameleon', 'themes/chameleon/chameleon.theme', 'a:12:{s:4:\"name\";s:9:\"Chameleon\";s:11:\"description\";s:42:\"Minimalist tabled theme with light colors.\";s:7:\"regions\";a:2:{s:4:\"left\";s:12:\"Left sidebar\";s:5:\"right\";s:13:\"Right sidebar\";}s:8:\"features\";a:4:{i:0;s:4:\"logo\";i:1;s:7:\"favicon\";i:2;s:4:\"name\";i:3;s:6:\"slogan\";}s:11:\"stylesheets\";a:1:{s:3:\"all\";a:2:{s:9:\"style.css\";s:26:\"themes/chameleon/style.css\";s:10:\"common.css\";s:27:\"themes/chameleon/common.css\";}}s:7:\"version\";s:3:\"6.4\";s:4:\"core\";s:3:\& in /homepages/35/d33505019/htdocs/bettinascheibe/drupal/includes/database.mysqli.inc on line 128

Warning: INSERT command denied to user 'dbo257905586'@'212.227.118.40' for table 'bs_system' query: INSERT INTO bs_system (name, owner, info, type, filename, status, throttle, bootstrap) VALUES ('bluemarine', 'themes/engines/phptemplate/phptemplate.engine', 'a:13:{s:4:\"name\";s:10:\"Bluemarine\";s:11:\"description\";s:66:\"Table-based multi-column theme with a marine and ash color scheme.\";s:7:\"version\";s:3:\"6.4\";s:4:\"core\";s:3:\"6.x\";s:6:\"engine\";s:11:\"phptemplate\";s:7:\"project\";s:6:\"drupal\";s:9:\"datestamp\";s:10:\"1218672610\";s:7:\"regions\";a:5:{s:4:\"left\";s:12:\"Left sidebar\";s:5:\"right\";s:13:\"Right sidebar\";s:7:\"content\";s:7:\"Content\";s:6:\"header\";s:6:\"Header\";s:6:\"footer\";s:6:\"Foot in /homepages/35/d33505019/htdocs/bettinascheibe/drupal/includes/database.mysqli.inc on line 128

Anyone has help? My whole site is not workin anymore *arrghh :D

dave reid’s picture

I think we've isolated the problems:
#305653: Themes disabled during update - Fixes themes being disabled when update.php is run
#147000: Rewrite module_rebuild_cache() and system_theme_data() - Fixes the massive delete/inserts that happen on the system table

atreju85’s picture

Hi! I had the same problem that you are describing. Try to change your database password and then manually updating settings.php to reflect the new password. Hope it helps!

munyiva’s picture

This worked for me.

valsjo’s picture

Open the file sites/default/settings.php

At the end of the file add:

global $custom_theme;
$custom_theme = 'garland';

Open a browser and go to your site e.g http://localhost/drupal. It will still (probably) complain about errors, but now you should have the possibility to login.

After logging in as administrator, go to Administer menu and then click on Themes link.
Click on "Reset To Defaults" button at the end of the page.
Click on "Save configuration" button.

Once again, open the file sites/default/settings.php
Remove the following:

global $custom_theme;
$custom_theme = 'garland';

Voila!

/rob

nacene’s picture

it did't work for me
my drupal is 6.4

any other solution ?

thanks

matthewg’s picture

This worked to get me back up, in and on. Now I just have to figure out how to get my custom theme back.

Thank you!

larryc11’s picture

I am so glad I found your suggestion for adding the two lines to the settings.php file. Who would have known. You saved days in troubleshooting.

I also now have to figure out how to regain my custom theme.

ron-g’s picture

goto http://site.drupal.loc/user (site.drupal.loc your drupal site)
this will display the login page
- login
- navigate to site building -> themes -> configure -> global settings
- scroll down to the bottom of the page click Reset to Defaults