Firstly thanks for all your work on the module. It's an essential part of any Drupal installation.
But have you got any ideas why this is coming up as a PHP error? I've never encountered this before.
Invalid argument supplied for foreach() in /home/cotton/public_html/dalstonair.org.uk/sites/all/modules/cck/content.module on line 1155.
Regards,
Andy
Comments
Comment #1
yched commentedPlease provide more info :
when exactly does this error occur, after doing what, when viewing what page, what fields are in the involved content type(s) ...
Comment #2
mthorblad commentedHave the same thing , it is on the start page , node1 and it is only for people that are not registed on my page
Comment #3
AndyW commentedThanks for responding.
It happens when I enable the content module - and only on the front page at the top of the content field where nodes are displayed.
Comment #4
AntinOz commentedIt is happening for me as well. The line numbers changed with the RC3 upgrade. It is happening both for registered and unregistered users and is happening on my blog page and also, strangely, when I run Cron manually as user 1.
Ant.
Comment #5
AndyW commentedFor the moment I've switched off the php error alert - it just logs it to the file rather than displays it on the frontpage.
I haven't noticed any other problems with the module other than the php error display
Comment #6
dopry commentedLooks like content.module trying to load data for content that doesn't have CCK fields... Should be fixed by the patch here: http://drupal.org/node/107407. please test.
Comment #7
yched commented@dopry : this will probably fix the symptom (error message), but not the underlying problem. $type['fields'] is supposed to always be at least an empty array, so foreach() shouldn't choke on it.
This kind of errors typically mean some module conflict, but this has always proved very hard to pin. Fixing the symptom is probably the best option anyway...
Comment #8
AntinOz commented@dopry: This appears to have stopped the error (or symptom anyway).
Ant.
Comment #9
matt.nz commentedGetting the same problem:
Invalid argument supplied for foreach() in /home/htdocs/modules/cck/content.module on line 1066.
Have recently moved to a new server and this issue appears to have popped up with 3.x
I'm not sure if it is related, but something is causing nodes on my site that are saved to save the title only! In other words, every other body/cck field is being wiped out!!
Comment #10
pfeff commentedI had similar problems to this. Turns out the reason was I'd deleted the anonymous user - uid=0.
I installed this module which creates uid=0 if it doesn't exist. Fixed the problems.
http://drupal.org/project/anonymous_user
Comment #11
leon0909 commentedIt happened to me,
as I've accedently deleted a return statement at the end of the view function, in one of the first custom modules I was writing.
ahh yep this was a...
return $node;
So take care and happy coding!)