I get this error when trying to add two fields (or add a multi-date field) in "Row style: Node - FullCalendar" options:
• warning: date_format() expects parameter 1 to be DateTime, null given in /Users/Cale/Sites/acquia-drupal/sites/all/modules/fullcalendar/fullcalendar.module on line 320.
There are a lot of people with this type of error but not with fullcalendar.module at the end.
319 $attributes['index'] = $index;
320 $attributes['start'] = date_format($attributes['start'], DATE_FORMAT_DATETIME);
321 $attributes['end'] = date_format($attributes['end'], DATE_FORMAT_DATETIME);
322
323 return l($text, $node->url, array('attributes' => $attributes));
}
I had a single date event working fine on one view... and a multi-date (From and To) event working fine on another view... but sometimes I get this error at the top of the calendar view... and I certainly cannot see the two events together on one view. I must not be doing something wrong. Thanks for help
Comments
Comment #2
calefilm commentedUpdate:
I seem to run into this error message when a field is not inputted yet. Thus, if i created the node but left the field empty. But this error is a little fidgety. Can't quite explain it yet--as it also comes up when I'm using the "From and To" date pop up selection field.
HOWEVER, I cannot get two different date fields operational on the FullCalendar. Even if I have created two separate single-date fields and inputted them correctly...
In My Calendar Row Style Options
Date Fields:
field_single_date_calendar_event
field_additional_dates_cal_event
I only can get the first field to show up on my calendar. I can interchange them but I can't see both at the same time. NOTE: the error doesn't show up when trying to implement this set-up.. because I have gotten rid of the "From and To" option.
Is this abnormal? Or is this normal for FullCalendar at this stage. Thanks again.
Comment #3
tim.plunkettNot sure about the issue with an empty field. That could use more testing.
As of right now, the calendar uses the first valid date field. If its a multiple value field, its added once for each. But not once per date field...
Comment #4
calefilm commentedah. Ok, that makes me feel better. Thanks. I can't quite pin down right now when I get the error or why but a number of people have issues with this type of Warning over at date.module http://drupal.org/node/518816
Will update this if I can be of help.
Comment #5
tim.plunkettcalefilm, can you try this patch?
Comment #6
calefilm commentedPatch works! Thank you Tim. Got rid of warning. Appreciate it.
Comment #7
calefilm commentedEarlier you stated, "If its a multiple value field, its added once for each. But not once per date field..." Do you think down the road we'll be able to add another date field? So that a user can add a date for 'field A' and then add a date for 'field B' and see both fields as a result of creating this node?
Comment #8
tim.plunkettThat is being worked on in #1036444: Cleanup the views UI + remove autodiscovery mega issue..
Will be for 7.x-2.x first, and 6.x-2.x shortly after.
Comment #9
calefilm commentedThanks for your hard work!
Comment #10
geerlingguy commentedSubscribe - just had this on my development server (first time I noticed the message), but I have no clue why it happened. A fresh db restore fixed it.
Comment #11
geerlingguy commentedThe patch got rid of the error for me.
Comment #12
geerlingguy commentedAt least it fixes the error - the other error (in my case) occurred between the keyboard and the chair.
Comment #13
tim.plunkettYeah, more investigating is in order.
Comment #14
socialnicheguru commentedthe patch worked for me also.
Comment #15
tim.plunkettAs mentioned in #8, this was handled by #1036444: Cleanup the views UI + remove autodiscovery mega issue..
Comment #16
dribblecastle commentedIssue started for me when I switched from a Date to a DateTime cck field.
Patch worked for me as well. Thank you very much!