Dear all

Thanks for your contributions, drupal is amazing and lots of modules are very useful.

About the issue

When I activate the agenda I get this error:
Fatal error: Call to undefined function date_make_date() in \drupal-7.0\modules\agenda\agenda.module on line 356

Does anyone know something about this error??

Thanks

Comments

toolin’s picture

this error is due to a change in the Date API module, instead of date_make_date you need to use the new DateObject class. see "D7 Changes" here: http://drupal.org/project/date

I fixed this as follows, but not sure if I'm using the DateObject properly.

Edit this block of code in agenda.module, line 354

  // If the Date API is installed, we can do better at DST times
  if (module_exists('date_api')) {
    $start               = date_make_date($event['start timestamp'], NULL, DATE_UNIX);
    $event['start time'] = date_format_date($start, 'custom', $block->timeformat);

    $end                 = date_make_date($event['end timestamp'], NULL, DATE_UNIX);
    $event['end time']   = date_format_date($end, 'custom', $block->timeformat);
  }

replace with

  // If the Date API is installed, we can do better at DST times
  if (module_exists('date_api')) {
    $start               = new DateObject($event['start timestamp'], NULL);
    $event['start time'] = $start->format($block->timeformat);

    $end                 = new DateObject($event['end timestamp'], NULL);
    $event['end time']   = $end->format($block->timeformat);
  }

alternatively, just comment out the whole block.

aidanlis’s picture

Status: Active » Fixed

Thanks, fixed.

Status: Fixed » Closed (fixed)
Issue tags: -undefined function, -date_make_date()

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

Issue tags: +, +