The latest CVS changes to event.module didn't run on my 4.7 based site. There were two problems. First, on line 1904 PHP apparently does not like an include directive within a switch block (but outside the context of a case).

Second, with that repaired several code paths include event_timezone.inc during the same execution, which causes duplicate definitions of the functions it defines. I fixed this by using include_once() rather than include. A patch against the current cvs version is below.

1800c1800
<         include_once(EVENT_PATH .'/event_timezones.inc');
---
>         include(EVENT_PATH .'/event_timezones.inc');
1903d1902
<           include_once(EVENT_PATH.'/event_timezones.inc');
1904a1904
>           include(EVENT_PATH .'/event_timezones.inc');
2024c2024
<   include_once(EVENT_PATH .'/event_timezones.inc');
---
>   include(EVENT_PATH .'/event_timezones.inc');

Comments

killes@www.drop.org’s picture

Status: Active » Fixed

thanks, fixed.

dado’s picture

Status: Fixed » Active

Using latest version of event module
$Id: event.module,v 1.206 2006/05/29 18:31:49 killes

Getting this error when I try to insert an event programmatically.

Fatal error: Call to undefined function event_get_offset()

My module is creating event nodes itself. Specifically it needs to set the event node's timezone by doing this

$node->timezone = event_timezone_map(variable_get('date_default_timezone', 0));

Why would the function event_timezone_map() appear to not exist?

dado’s picture

This error is also being experienced by users using node_import module. Was working previously, no change to the node_import code
http://drupal.org/node/67057

dado’s picture

Priority: Critical » Normal
dado’s picture

I am using Drupal 4.7.1 release.
i get this error with current 4.7 version of event module. To make the error go away, I must roll back to this version of event module, when event.module was at v1.196
// $Id: event.module,v 1.196 2006/05/11 08:27:52 killes

webchick’s picture

Getting this on signup module as well. Though only on a remote server running PHP 4 and not locally running PHP 5.

webchick’s picture

scott.mclewin’s picture

Version: 5.x-2.x-dev » 4.7.x-1.x-dev
Status: Active » Fixed

I've not seen this issue in seven months. I'm assuming that the re-opened instance of it is also not happening. changing from HEAD to 4.7, since that is what HEAD was way back in May, and changing to fixed to start this issue marching off my issues list and the queue for the event module.

Anonymous’s picture

Status: Fixed » Closed (fixed)