I realize this is a problem with 4.7 - it is also a problem with Final release 5.0, updated CCK 1.2.2.2, views 1.2.2.3, calendar 5.x-1.1 dated 1/12/07.

I use a node reference in a content type that is used in another content type. I then create a calendar view. When viewing the calendar I get the error multiple times for each node in the second content type that references the first content type:

warning: Invalid argument supplied for foreach() in /home/harriska/public_html/drup/modules/cck/content_views.inc on line 149.

Comments

merlinofchaos’s picture

Project: Views (for Drupal 7) » Content Construction Kit (CCK)
Version: 5.x-1.5 » 4.7.x-1.x-dev
Component: Code » Views Integration
harriska2’s picture

Hi Merlin - this is most definitely an issue with the Calendar views plug in module. When not using the calendar type view and just creating a view using tables, it works fine.

Here is an example with tables:
http://teachernotes.org/drup/menu_list

Here is the same data with calendar type layout in the view:
http://teachernotes.org/drup/menu_calendar/2007/2?

The first field is a node reference (the meal), the second is the taxonomy term (breakfast, lunch, dinner) and the third is the date.

yched’s picture

http://drupal.org/node/108226 seems related, if not a duplicate.

harriska2’s picture

That link above is for views fusion, a module I do not use. However, it could be related. My problem is specific to the Calendar views function when using a node reference. When not using the Calendar views function, the node reference works fine.

yched’s picture

Project: Content Construction Kit (CCK) » Calendar
Component: Views Integration » Code

Right. The 'invalid argument in foreach' error in the other thread got fixed internally in views fusion - the thread is now about something else, unrelated.

But I guess that similarly, the 'invalid argument in foreach' error you're reporting might be specific to Calendar. I'm bringing this over there.

KarenS’s picture

Status: Active » Fixed

This turned out to be extremely tricky to identify, but should be fixed now in latest commit, and will probably fix other errors in display non-date fields in the calendar.

Anonymous’s picture

Status: Fixed » Closed (fixed)