I am getting the following error when both the Drupal for Facebook Canvas module and the Admin (6.x-1.0-beta3) modules are enabled. Disabling either module causes the error to go away.

warning: array_map() [function.array-map]: Argument #2 should be an array in /home/don/public_html/drupal/modules/system/system.module on line 1015.
warning: array_keys() [function.array-keys]: The first argument should be an array in /home/don/public_html/drupal/includes/theme.inc on line 1771.
warning: Invalid argument supplied for foreach() in /home/don/public_html/drupal/includes/theme.inc on line 1771.

http://drupal.org/project/admin

don

Comments

Dave Cohen’s picture

Status: Active » Postponed (maintainer needs more info)

Can you determine what functions are causing these errors? What's being passed in that shouldn't be?

I don't expect every third-party module to work properly on canvas pages. Especially those that rely on javascript. And I don't have time to install third-party modules and reproduce every problem.

nmss’s picture

Getting the same error after uploading a Xampp locally built site with custom theme enabled to webhost and logging in, the site then has no theme enabled and my custom theme has disappeared from "themes". Not sure where the problem arises and how to get my custom theme to appear again.

5dayapp’s picture

Title: warning: array_map() [function.array-map]: Argument #2 should be an array in system.module on line 1015 » You ever get an answer?

You ever figure out what happened? I cleared the cache and the problem went away, but it's a bit concerning.

I should clarify. I had exactly the same problem - theme is no longer enabled. I can just re-enable the theme. I'm completely baffled. Apparently, this incarnation of Drupal decides it like a particular theme and just disables the new theme(s) when it feels like it. I can consistently recreate the problem in this installation, but have never witnessed this behavior before.

I'm running Drupal 6.15 with a slew of modules (though this problem doesn't appear to be a particular module at all, but a core error caused by no enabled/available default theme).

Dave Cohen’s picture

Title: warning: array_map() [function.array-map]: Argument #2 should be an array in system.module on line 1015. » warning: array_map() [function.array-map]: Argument #2 should be an array in system.module on line 1015
5dayapp’s picture

Never saw an answer.

Dave Cohen’s picture

Title: You ever get an answer? » warning: array_map() [function.array-map]: Argument #2 should be an array in system.module on line 1015

I haven't reproduced, and I have no answer. Sounds like not a problem with Drupal for Facebook.

MaT972’s picture

This problem is definitely not related to facebook canvas, as I have the same problem (and not using fb canvas).
I reported the issue here

Admin module is installed on 6.15 drupal install, but not enabled.

Dave Cohen’s picture

Category: bug » support
Status: Postponed (maintainer needs more info) » Closed (won't fix)

Ok I think the evidence is in. Not fixable in these modules. Let me know if I'm wrong.

steve_adams’s picture

same issue reported here with no fix to date
http://drupal.org/node/696184

johnphethean’s picture

I don't have Drupal for Facebook switched on and I'm getting these same error messages on every page now and no CSS stylings whatsoever, just plain text as index.php pumps it out. I think it's related to my customised theme (Framework) but can't work out how, maybe regions?
The error messages just suddenly started coming up for my client - he said he didn't change anything and then one day he couldn't access admin.
I still can't get access to the admin pages ("Access Denied, You may need to login").
I tried to switch themes to Garland (which is present in themes folder) both using settings.php default theme override and via the database 'variables' table but with no effect - still the same error messages.
I updated the system files to Drupal 6.15 but on visiting update.php they're not showing up as an available update - what?
If someone can help that would be great.
The site is at http://www.1plusinfinity.com
Thanks
John

Dave Cohen’s picture

Status: Closed (won't fix) » Closed (duplicate)

Not to be rude, just honest, this discussion does not belong here in the Drupal for Facebook issue queue. The right people will not see it here. Try one of the links in earlier comments.

That said, this might help... if you can reproduce this (I haven't) try adding code to system.module line 1015...

// enable devel module for dpm to work!
dpm(func_get_args(), "here are the args...");

Then look at the page returned. You should see all the data passed to whatever function it is. That might give someone a clue as to what's going wrong. You'll probably see that argument 2 is not an array, like the error says.

I find errors like this often happen when a module is not properly upgraded from one version of drupal to the next. Since drupal loves to change parameters that functions expect.

sdancer75’s picture

Component: Canvas Pages » Code

Same problem to me too !

I removed devel-6.x-1.20.tar.gz module and it worked.

mareks’s picture

I think I got these error messages due to an invalid region names (special characters) in .info file.

calvinh’s picture

I got these errors when I upgraded my Open Atrium install (DreamHost one-click install) to Drupal 6.20. I had no extra modules or themes installed, and the upgrade was otherwise successful.

My eventual solution was to go to the themes menu and enable the Garland theme. I guess the upgrade process deleted the Open Atrium theme and that was causing the problem.