Not sure if this has been reported yet, but I don't see it scanning through existing issues. I've had this problem for the last handful of builds of Views 2. When I've got a node reference field in a view and group on multiple values for that field, I get the following error for every record returned in the view (one error for each record, no matter if it is a node that actually has multiple values in the reference field or not). I've tried clearing the cache, etc.

warning: Invalid argument supplied for foreach() in /home/guygord/public_html/sites/all/modules/cck/content_views.inc on line 488.

Comments

yched’s picture

Project: Views (for Drupal 7) » Content Construction Kit (CCK)
Version: 6.x-2.x-dev » 6.x-1.x-dev
Component: Code » Views Integration

Thats' for CCK.

yched’s picture

Also : please make sure you have the very latest code for both Views 6.x-2.x and CCK 6.x-1.x

guygg’s picture

Good grief, didn't even notice the code path with CCK in it. Never mind my stupidity...

Yeah, I've updated the code for both a number of times. I'll take it up on that side of things, then. Thanks.

guygg’s picture

Is anyone else seeing this? I've been doing version updates of both CCK & Views, and I still get this on views where I have a node reference field that's grouping multiple values. I just tried a clean install of core 6.2, CCK 6.x-1.x-dev (2008-Apr-29) and Views 6.x-2.x-dev (2008-Apr-29). It throws this error message once for every record that's displayed in the view:

warning: Invalid argument supplied for foreach() in /home/guygord/public_html/sites/all/modules/cck/includes/content.views.inc on line 479.

The Query contains nothing related to the node reference field that has multiple values (other node reference fields of only one value display fine, and are referenced fine in the query). If I set it in the view to not group multiple values for that node reference field, I get no error, but I get the node displayed multiple times, one for each of the values in that multi-value reference field.

I've been experiencing this issues for weeks, and have bumped up build after build of both CCK & Views, and have had this problem in every single build of them I've tried. Here's the server info. I'd LOVE to get this to finally work, and have no idea what's going wrong. I was hoping a clean install would resolve it, but it didn't.

MySQL database 4.1.22
PHP 5.2.1
PHP memory limit 32M
PHP register globals Disabled
Unicode library PHP Mbstring Extension
Update notifications Enabled
Web server Apache/1.3.37 (Unix) mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b

karens’s picture

Status: Active » Fixed

This turned out to be something completely unexpected -- a missing value for the content type that kept the module from retrieving the right label from the allowed values list. Should be fixed now.

karens’s picture

Status: Fixed » Active

Marked the wrong issue.

karens’s picture

Status: Active » Fixed

OK, now it's really fixed. It turned out to be a problem specific to the nodereference field where the nid column in the nodereference field was being confused with the nid of the parent node in our grouping query.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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