I am running Drupal 6.6, and I'm getting the follow error:
# warning: Invalid argument supplied for foreach() in /home/bherring/public_html/thehateguild/sites/all/modules/cck/content.module on line 422.
# warning: Invalid argument supplied for foreach() in /home/bherring/public_html/thehateguild/sites/all/modules/cck/content.module on line 422.
# warning: Invalid argument supplied for foreach() in /home/bherring/public_html/thehateguild/sites/all/modules/cck/content.module on line 422.
# warning: Invalid argument supplied for foreach() in /home/bherring/public_html/thehateguild/sites/all/modules/cck/content.module on line 422.
# warning: Invalid argument supplied for foreach() in /home/bherring/public_html/thehateguild/sites/all/modules/cck/content.module on line 422.

As background, I have been trying to fix bugs in my website. With the update to 6.6, I decided to do a fresh install. I copied my old database to a backup database, dropped all tables, backed up the /files & /sites directory and did a fresh install of Drupal. Then, I painstakingly copied the data a few tables at a time to the new database leaving out certain tables I knew had corrupted entries. I tried to copy over only the minimum required entries, and it seems to be working so far. Except for this error. Any help appreciated on how to fix it. :)

Comments

BOZMAN’s picture

i am getting the same error. just upgrading my site to new core version.
looking forward to responses

Rhino’s picture

I'm only getting this error after enabling the Amazon module.

Rhino’s picture

ah, ok, in my case the drupal is looking for a table called amazon_item but I have a table called amazonitem instead. Fixed.

Rhino’s picture

More info - check what content types you have available (and which ones should you have?) In my case the previously existing content type "amazon" and amazon node" didn't exist, thus looking at any node that used to be one of those brought up this error.

Could be any old content type you invented I presume.

yched’s picture

Status: Active » Fixed

Anyone seeing this : this is actually the sign that some nodes in your site have a node type that the system doesn't know anymore.
Could be caused by various reasons : that content type has been deleted on admin/content/types page, some contrib module is buggy...

Now, I thought I fixed our own code so that CCK stops raising errors for those, but it turns out my fix was incomplete.
"Fixed' now in CCK -dev, in the sense that CCK will silently ignore those inconsistences.

Status: Fixed » Closed (fixed)

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