Errors some coming from views I am not exactly sure whats going on because my site was fine earlier today then all of the sudden I started to get these errors below:

* warning: Invalid argument supplied for foreach() in /home/xxxx/public_html/dru/dru/modules/views/includes/handlers.inc on line 807.
    * warning: Invalid argument supplied for foreach() in /home/xxxx/public_html/dru/dru/includes/common.inc on line 1637.

If anyone could help me figure out what it means that would be sweet thanks!

Comments

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

Can you please provide more informations. For example, when is the error display.
If its related to a certain view, export the view etc.

Please read the submission guidelines of views.

Hara Kim’s picture

It seems to be random actually sometimes the errors display and sometimes they dont when i click on different pages.

dagmar’s picture

As dereine said, if you don't provide more information, we cannot help you.

Please read http://drupal.org/node/571990.

gabor-1’s picture

Status: Postponed (maintainer needs more info) » Active

Dear Expert friends, I get the same error message on all my pages.
"Invalid argument supplied for foreach() in /home/virtual_host/mydros.hu/drupal/includes/common.inc on line 1637."
As I use a non-modified version of common.inc, I suppose that the problem is caused by PHP 5.3 incompatibility.
I'm new to this site, so I apologize if I didn't follow all the regulations :)
Thank you for your help in advance!

function drupal_map_assoc($array, $function = NULL) {
if (!isset($function)) {
$result = array();
foreach ($array as $value) {
$result[$value] = $value;
}
return $result;
}
elseif (function_exists($function)) {
$result = array();
foreach ($array as $value) {
$result[$value] = $function($value);
}
return $result;
}
}

merlinofchaos’s picture

Are you using taxonomy_menu module?

Hara Kim’s picture

I was before I believe I still am is that the source of the problem? I am also using the ubercart theme which I heard may have issues with views

gabor-1’s picture

Yes I have taxonomy menu! :)

Hara Kim’s picture

Status: Active » Fixed

The errors seemed to stop after i disabled the taxonomy menu thanks!

merlinofchaos’s picture

Status: Fixed » Closed (duplicate)

See #407538: "Invalid Argument supplied for foreach" in common.inc -- a patch to Views was commited to 2.7 to fix the errors that it throws, though I think taxonomy_menu must still be doing something wrong for those errors to be happening.

grasmash’s picture

I'm experiencing this exact same error:
warning: Invalid argument supplied for foreach() in /home/xxxx/public_html/dru/dru/includes/common.inc on line 1637.

It repeats twice on every page.

The problem started when I changed the name of a menu item and saved the settings.

I was using taxonomy menu, but I have disabled and uninstalled it.

I have also upgraded to views 2.7, and the error persists. Any other ideas?

R.Hendel’s picture

@madmatter23:
Did you flush all of your caches?
After uninstalling AND flushing all caches that error messages disappeared in our System.

drupdruppalpal’s picture

the same issue,
im using tvi module.
uninstalling

drupdruppalpal’s picture

i have updated to TVI beta 4 and it have solved the problem.
tvi now works ok with views!
regards

jamesialford’s picture

Thanks drupdruppalpal, your comment worked for me as well.

James

lizard78’s picture

I have the same problem!
warning: Invalid argument supplied for foreach() in /home/www/doc/domain.com/www/drupal/includes/common.inc on line 1637.

I cannot install TVI and TVI beta 4. If I try it, I get this error: Fatal error: Cannot redeclare tvi_schema() (previously declared in /home/www/doc/domain.com/www/drupal/modules/tvi/tvi.install:16) in /home/www/doc/domain.com/www/drupal/modules/tvi.install on line 58

Who can help ????

merlinofchaos’s picture

#15: Post your issue in the TVI queue. There's nothing we in the Views queue can do about other modules.