I upgrade from views 6.x-2.12 to 6.x-2.16. I cleared the cache twice. When I checked the log I have two separate errors:

Invalid argument supplied for foreach() in /var/www/health/includes/common.inc on line 927.

strtr() [function.strtr]: The second argument is not an array. in /var/www/health/includes/common.inc on line 944.

Can someone give me some ideas on how to troubleshoot. Everything worked fine before the views upgrade.

Comments

dawehner’s picture

Mh nearly everything could have produced that. Can you reproduce that on the live site?

beyond67’s picture

The only change I made to the site was the upgrade in the views module. Everything was ok before.
I do not want to use this on the live site since Im not sure if there are any negative effects.
My test server is a mirror of the live site.

Any clues?

merlinofchaos’s picture

You might try adding a dsm(debug_backtrace()) at those lines in the code to see where this is coming from. This requires some moderate PHP knowledge to do, though.

dawehner’s picture

Maybe place something like a backtrace() in the broken functions to see what is calling that. You know things like this are often caused by some broken custom/contrib code. If views would be the root of evil many more users would report it

beyond67’s picture

It seems the issue was with the Views Watchdog module. I upgraded it to the recently released version and now those errors are no longer present. So things are looking good so far. Thanks for the help!

dawehner’s picture

Status: Active » Fixed

So update status.

Status: Fixed » Closed (fixed)

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