After upgrading latest 5er stable version to 6 (upgrade went without errors), going to my theme I see the following errors and the page looks screwed:
* warning: array_map() [function.array-map]: Argument #2 should be an array in D:\htdocs\drupal6\modules\system\system.module on line 960.
* warning: array_keys() [function.array-keys]: The first argument should be an array in D:\htdocs\drupal6\includes\theme.inc on line 1712.
* warning: Invalid argument supplied for foreach() in D:\htdocs\drupal6\includes\theme.inc on line 1712.
For the first error, arrap_map I've verified that the 2nd argument does indeed seem to be an array- though empty.
Any ideas?
Comments
Comment #1
andig commentedComment #2
gpk commentedIf the theme is a contrib. theme, did you install a new Drupal 6 version, or if it is a custom theme, did you update it yourself http://drupal.org/node/132442?
Comment #3
Anonymous (not verified) commentedI am getting this error msg also, again right after upgrading to 6.0 from latest 5x. Have not touched the theme, but I was previously using a modified version of Box Grey theme.
Comment #4
ohthehugemanatee commentedI also just ran the upgrade. I get this error even when I use a stock theme. Unfortunately, I can't seem to access anything past the frontpage, so I couldn't log in to change the theme *properly*... I just copied the drupal 6 supplied bluemarine to the folder I knew it expected for my custom theme.
Anyway, no dice.
I think this is an unrelated problem, but as I mentioned I can't seem to access any pages except the front. I get 404 messages for everything. I'm checking into my .htaccess in case there's a problem there... will post apropriately as I figure it out.
Comment #5
ohthehugemanatee commentedDoesn't seem to be a problem if I create a new site, so there's something funny in the upgrade. Will continue posting....
Comment #6
ohthehugemanatee commentedSeems that my problem came from my changing the DB name in my upgrade. I had tried the upgrade while transferring to a new server, ,and in the process changed the dB name. Dunno why, but with the new DB name it just wouldn't load my theme.
I'm going to keep sorting out the new server issues on drupal 5, and then do the upgrade again once all those kinks are worked out.
Comment #7
andig commentedI see the problem with a custom theme. Again- cannot login as everything is screw. Doh:
Comment #8
andig commentedMhhm. After logging in with ?q=user and changing the administrator theme to garland (after login, no theme was selected), I was able to get into the admin ui. What is funny is that under themes, my custom theme doesn't appear anymore!
I believe the problem might be something like
-drupal5 theme not compatible with drupal6 (for currently unknown reasons)
-theme therefore not available to application
-upgrade doesn't check for theme availability
-site launches with unavailable theme selected
Any idea how I could modify/check my theme for compatibility?
Comment #9
andig commentedComment #10
gpk commentedFrom http://drupal.org/drupal-6.0:
An important usual step (perhaps not mentioned clearly) is to select a core theme during the upgrade process.
Drupal 5 themes will not work unchanged with Drupal 6. For a start, in Drupal 6 a theme has to have a .info file. If a custom Drupal 5 theme is active during the upgrade then yes it is likely to cause all sorts of PHP errors with Drupal 6.
See also http://drupal.org/node/132442.
Comment #11
andig commentedGood one. Added .info file and site is back up. Upgrade process definitely needs improvement for identifying unsupported templates.
Only now- going into admin is endlessly slow. Need to open separate bug for this.
Comment #12
gpk commentedYes as a minimum a reminder to disable non-core themes and modules would be useful. A warning about incompatible themes (and modules?) that are currently enabled would be better.
[Edit]
Actually, this function http://api.drupal.org/api/function/update_fix_compatibility/6 is I think supposed to disable incompatible themes and modules automatically prior to updates being performed. Seems like something didn't work in your case - maybe the theme didn't get disabled, or maybe it did get disabled but was still stored as the "default theme" leading to an inconsistency in Drupal's settings, and that is what caused the problem.
Comment #13
gpk commentedComment #14
Plazzmex commentedI have the same problem...
now i had installed Drupal 6.1 for the first time.
went to the comtrol panel -> status report
then clicked on 'run cron manually' - > it said me:
* warning: set_time_limit() has been disabled for security reasons in *****/includes/common.inc on line 2500.
then when i ran it second time i got those errors:
* warning: set_time_limit() has been disabled for security reasons in *****/includes/common.inc on line 2500.
* warning: array_map() [function.array-map]: Argument #2 should be an array in *****/modules/system/system.module on line 958.
* warning: array_keys() [function.array-keys]: The first argument should be an array in *****/includes/theme.inc on line 1712.
* warning: Invalid argument supplied for foreach() in *****/includes/theme.inc on line 1712.
what's the problem ? i'm not upgrading.. i've installed just now the last version 6.1 from scratch, on new database..
Comment #15
gpk commentedHmmm the set_time_limit() looks like a separate problem (caused by this function being listed PHP's "disable_functions" configuration setting). However it shouldn't affect anything else ...
Are these errors recorded in the dblog report (aka watchdog)? If so, against which "Location" (when you view the details of the error)? Do you get these errors on every page view now?
Also in the {system} table in the DB what themes can you see (type = theme) and what is their status? And in {variables} what are the value of theme_default and admin_theme?
Comment #16
ddyrr commentedI get the same three errors for a new install with a custom theme in version 6.2 every time cron runs:
* warning: array_map() [function.array-map]: Argument #2 should be an array in ......\modules\system\system.module on line 975.
* warning: array_keys() [function.array-keys]: The first argument should be an array in .....\includes\theme.inc on line 1712.
* warning: Invalid argument supplied for foreach() in ......\includes\theme.inc on line 1712.
Luckily, this is still a test site!
As soon as I log in as admin, the error goes away for everyone. I did a little testing, and found that the custom theme we use is deleted for some reason. It just doesn't exist, so there is nothing to grab. If I put another call to system_theme_data() (which rebuilds the theme data, and also seems like it may be the culprit, since it deletes all the themes as part of the function) right before the data is selected on line 974, in the system_region_list function in system.module, everything goes back to normal.
This was just for testing of course, and I deleted the line again, since I don't want to rebuild all the theme data on every page load. It also seems to show that the system_theme_data function may not be the culprit after all... and I don't know if it's even called during a cron run. Does anyone know how this is happening? Why would my custom theme be deleted from the system table during cron?
Comment #17
dave reidAfter 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.
Comment #18
dave reidMarking as a duplicate of #305653: Themes disabled during update.
Comment #19
andypostSubscribe, suppose cron affected too