Archive for the ‘Drupal’ Category

Drupal Argument #2 should be an array in system.module on line 1015

Monday, September 6th, 2010

If you update Drupal or one of its modules and you get the following error on a white page with no style:

warning: array_map() [function.array-map]: Argument #2 should be an array in system.module on line 1015

It means that your theme is no longer enabled.

I updated Drupal using the instructions Upgrading Drupal rapidly using SSH/Shell commands. This is an excellent resource. Take the time to follow all of the steps, including making backups! It’s the backup that allowed me to quickly resolve the issue.

The instructions preserve the sites folder, but not the themes folder. I created a custom theme for my wife’s blog. When upgrading Drupal, this custom theme was backed up, but not applied to the new installation.

The discussion on this issue report led me to look at the Themes admin page, where I discovered that the custom theme was no longer listed. I copied the theme from the backup (cp -r d-backup/themes/mtheme/ themes/) and refreshed the page. The theme was listed, but not enabled. I enabled it, set it to the default, and checked the site again. The issue was resolved.

Overall, I like Drupal. But it suffers from its PHP foundation. In general, it does a good job of abstracting the user from the PHP underpinnings, but when it breaks, it breaks hard.