Posted by jim0203 on October 30, 2009 at 9:04pm
Jump to:
| Project: | Views Calc |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Clean install of Drupal 6.14, Views Calc 1.3, Views 2.6.
Set up a simple View: a list of nids, for example. Change the style to Views Calc Table, but then don't display any calculations: just hit update.
You get two error messages, each saying:
warning: Invalid argument supplied for foreach() in /Applications/XAMPP/xamppfiles/htdocs/drupal6/sites/all/modules/views_calc/theme.inc on line 178.
Patch attached; it just checks that the array in foreach() on line 178 is actually an array.
| Attachment | Size |
|---|---|
| line178.patch | 3.49 KB |
Comments
#1
Tested against 6.x-1.x-dev and it fixes the issue (for me).
I tend to be "special" when it comes to code problems so it would be good to have someone else review the patch :)
#2
How should I apply this patch? Does it completely replace the existing code in theme.inc?
Thanks!
Nevermind... I figured it out... First time I ran a patch... for those of you out there like me....
On Linux systems. Use wget to copy the patch to the module directory where the file you want to patch lives.
Type the following command: patch theme.inc line178.patch
Done.
#3
For the record, for documentation on applying patches http://drupal.org/node/60108 is a great resource.
#4
I have a view containing a simple computed field column containing float numbers -- I would like to show their sum, average, atc.
Even without selecting any fields I am getting the same error message, same line number (for the latest stable version 1.3, and also for the latest dev version).
Applied jim0203's patch and the error message disappeared... but also all the result rows have disappeared :-(
#5
I have the same issue on a live site. Not about to apply a patch but am willing to test a dev version with this patch applied.
Nevermind, reread the documentation and found the issue was arrising from the settings not being correct in under 'views calc table'.
#6
These issues has been fixed as a side effect with this commit.
#823516: Improved summary view execute
The code above was not considered.
#7
Automatically closed -- issue fixed for 2 weeks with no activity.