Views Calc not working

Rosamunda's picture

I´ve recently installed views calc (I´ve got last stable release of views and cck), and got a nasty error:
warning: Invalid argument supplied for foreach() in .../sites/all/modules/views_calc/theme.inc on line 160..(*)
But, sometimes, randomly, the error won´t appear, but the view won´t work either.

I´ve look for that error at the forums, and found nothing.
I´m attaching the strange and totally random behaviour of Views Calc as a png. It should show the sum of the one column with the prefix $.

Any ideas of what could cause this?
Thanks for your help!
Rosamunda

AttachmentSize
views_calc_error.png33.01 KB
Login to post comments

I'm guessing...

DeeZone's picture
DeeZone - Sun, 2009-03-29 23:08

I'm guessing you have some type of conflict between your active theme and the module include file. Can you try running the view in a different theme? The randomness I suspect is due to caching.

All just off the top of my head, others should have greater input.


Thanks Darren! I´ll try

Rosamunda's picture
Rosamunda - Mon, 2009-03-30 17:19

Thanks Darren!
I´ll try that, never ocurr to me that the theme could be the issue...

Update: I´ve changed default to bluemarine, and the problem is still there...


Check that your view needs a calculation..

Ryan Weal's picture
Ryan Weal - Thu, 2009-09-24 08:35

I have a view containing a number of pages and blocks that were affected by this error. It seems that if one of your displays does not have the calculations on it you will get this error.

My solution was to figure out which view did not need the "views calc table" style, override the style and set it to "table" ... since that is all that is really needed.

You can find more information on this thread:

http://drupal.org/node/455822#comment-2077150