I'm getting this error when I have the CCK Imagefield module enabled "Invalid argument supplied for foreach() in /var/www/html/pokershark/sites/default/modules/cck/content.module on line 236.". When I disable Imagefield module, the error disappears. I'm running d6 and the most recent version of imagefield. Any ideas how to fix this error?

Comments

DrupalKing’s picture

Update: I've disabled every caching element on the Performance page but when I clear the Drupal cache and load the page, I dont get the error message but when I reload the page again, the error message returns.

quicksketch’s picture

What version of CCK and FileField are you running? Exactly when do you get the error? On every page, when viewing a page with an ImageField, when editing, etc.?

DrupalKing’s picture

I am using CCK 2.2 and FileField 3.0-rc1 and am running ImageField 3.0-rc1.

I only get the error on one page that has a View with the CCK imagefield fields on it. I do have other pages that have a View with the same CCK Imagefield field but no error. I do not get the error on the edit page.

DrupalKing’s picture

Any help on this?

quicksketch’s picture

I don't know how to reproduce this problem. It might be quite apparent on your site, but from a fresh install of Drupal I'm not seeing this problem. If you can provide a set of steps to reproduce the problem from a fresh install it would help in finding (and fixing) the problem.

DrupalKing’s picture

Basically CCK + Imagefield + Views + Taxonomy (all most up-to-date versions).

Here is the view I'm generating: http://pastebin.com/m6b987a79

The US Poker Rooms page is the one that generates the error.

quicksketch’s picture

Sorry this error just looks too complex for me to reproduce. It might be caused by the use of the "Group multiple values" option within the view when configuring the image field. I just don't think I'll have the time to setup a site with all the modules and configuration necessary within the view you exported.

DrupalKing’s picture

I can offer you access to sandbox copy of my site so you can evaluate. PM me and I'll hook you up.

DrupalKing’s picture

Can you at least elaborate as to the issue of "Group multiple values" and how I could test to see if that is the issue?

quicksketch’s picture

Title: Invalid argument supplied for foreach() » Invalid argument supplied for foreach() when displayed within a view
Status: Active » Postponed (maintainer needs more info)

If you can provide a step-by-step set of instructions on how to build the view (starting with installing Drupal and necessary modules) with a minimal number of fields cause the problem I'll take another look at this. Otherwise I'm just stabbing in the dark for where the problem exists.

DrupalKing’s picture

After playing around some, it turns out the error was being caused by some sort of conflict with an OpenX ad I was also running on my site. It was a local tag mode code in a block on the page and when I changed the OpenX ad to Javascript, the errors have disappeared.

quicksketch’s picture

Category: bug » support
Status: Postponed (maintainer needs more info) » Fixed

Doh, advertising strikes again. Marking as fixed.

Greg Go’s picture

Just FYI for others checking this thread:

I was getting these same errors (FileField 6.x-3.0-rc1 and CCK 6.x-2.2) after our server crashed. Clearing the cache (/devel/cache/clear) cleared up the errors -- on all subsequent page loads (unlike what's reported by #1 above). There are no ads (openx or otherwise) on my pages.

Hope that helps someone.

Status: Fixed » Closed (fixed)

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