If I log out from my site and come back as an anon user after a while the theme is broken and I get the following errors:

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

When I log in and and visit the themes page in admin, the theme works again and the errors disappear.

I have cache enabled for anon users.

Comments

JohnForsythe’s picture

Status: Active » Postponed (maintainer needs more info)

I'm not aware of anything in the theme that could cause that.

A Google search turns up hundreds of sites with the same error, but none of them appear to be using my theme.

http://www.google.com/search?q="system.module+on+line+975"

If you can determine something specific in my theme that might be triggering it, let me know. Otherwise, I suspect it's either a Drupal core bug, or related to a module you're using.

A Drupal search also turns up some reports with conflicting information:

http://drupal.org/search/node/%22system.module+on+line+975%22

Is this a new site, or did you upgrade from 5.x? Is the site in english?

lennart’s picture

Thanks.

Yes. I saw other people had the problem after upgrading, but my site is a fresh 6.3 install.

The reason I believed it was a theme related problem was because I did not encounter the problem when using the standard garland theme.

I will investigate a bit further and return to update this issue.

lennart’s picture

Status: Postponed (maintainer needs more info) » Fixed

Well. It keeps happening with the Atlantis theme, no problem with Garland. It could be some specific interaction problem. I have a lot of modules installed. Since no one else seems to have this problem. I'll mark it fixed.

JohnForsythe’s picture

I was looking at system.module earlier. Here's the line where it errors:

$list[$theme_key] = array_map('t', $info['regions']);

If I was going to guess, I'd say it could have something to do with themes that define regions in their .info file. I know Garland doesn't do this.

lennart’s picture

Thanks.

You were right. The issue has to do with defining regions in the .info file

I removed the regions from the .info file and replaced $sidebar_left with $left and $sidebar_right with $right in the page.tpl.php and the problem is "solved".

lennart’s picture

In fact the errors seem to persist even when using only the non-defined standard regions. The errors only arise if I 1) log out and 2) leave the site for some days and come back as an anon user.

lennart’s picture

and 3) use cache. Anyway, like I said, I am apparently the only one with the issue so I will leave it at this.

Oceria’s picture

If you use CSS compression clearing the cache will not solve your problem. You need to stop cacheing AND stop compressing css, open the frontpage again and check for errors. Only then the new css and new templates will be used. If you use caching locally, (squid or something like that), you will need to force a flush on that cache as well.

lennart’s picture

Thanks. I will give it a try :)

JohnForsythe’s picture

I just updated the Drupal 6 release to v1.2. It contains some new region fixes that might take care of this issue.

Dave Reid’s picture

I was having this problem because somehow under admin/build/themes at my Drupal site, somehow I had no 'enabled' themes. You might want to check if you have the same problem and re-enable the themes you're using to fix this.

lennart’s picture

It seems to be fixed now.

Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.