i'v just installed both 2.x-dev versions (calendar and date) and if i enable the calendar view and wanna visit the /calendar site, the watchdog gets filed with millions(!! -i am not kidding.. i need to kill the sql-process) of these messages

date_format() expects parameter 1 to be DateTime, null given in /var/www/www.trekking-blog.de/modules/calendar/calendar.inc in Zeile 160.

about row 160 of calendar.inc is:

function calendar_build_calendar($view, $items, $params) {
// Remove nodes outside the selected date range.
$values = array();
foreach ($items as $delta => $item) {
if (($item->calendar_start_date >= $view->min_date && $item->calendar_start_date <= $view->max_date)
|| ($item->calendar_end_date >= $view->min_date && $item->calendar_end_date <= $view->max_date)) {
$values[date_format($item->calendar_start_date, 'Y-m-d')][date_format($item->calendar_start_date, 'Y-m-d')][] = $item; <-- this is row 160 -->
}
}

i get this error for ~ 10 rows..

how can we get this fixed? it doesnt work at all...

the view used is the "standard" /calendar .. which comes with the module.. so, nothing special.

thanks
Andreas

CommentFileSizeAuthor
#3 modules.png890.13 KBGoose4all
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

KarenS’s picture

Status: Active » Postponed (maintainer needs more info)

You used the standard calendar with the node.changed date? You didn't change it to use a different date? Something about your environment is different than mine because it works perfectly for me. I don't need to know what line 160 of the code says, I can figure that out, I need to know how to reproduce your situation. It doesn't do this out of the box on a clean install.

If you changed the calendar to use a date other than node.changed, I need to know what kind of date you are using. What modules do you have enabled? Are you using Calendar iCal? What version of PHP are you using?

If you made *any* changes to the standard calendar, I need to see an export of the calendar.

What version of Views are you using? If this module was changed to use a CCK date field, what version of CCK are you using?

KarenS’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

Never mind, I forgot which version we were using. In the D5 version you have to add a date field to the calendar or it won't work. There is an issue about this already at http://drupal.org/node/247215. The errors will go away when you add a date field to the view, but I need to either add a default field or force a validation error if there's not one there.

Goose4all’s picture

Status: Closed (duplicate) » Postponed (maintainer needs more info)
FileSize
890.13 KB

i've just installed the module and enabled it.. no changes to anything at all..

my php-info:

PHP 5.2.3-1ubuntu6.3 (cli) (built: Jan 10 2008 09:38:41)
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

my modules are shown within the screenshot.. i thought it might be easier to read...

all downloaded yesterday / today.. so all those dev-versions are up to date.

Goose4all’s picture

Status: Postponed (maintainer needs more info) » Fixed

thanks!

that did the trick...

sorry.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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