Just updated Calendar, Date, Views and Event modules on one of my sites and now have a blank page when I try to visit the calendar.
Looking at the Apache Log I see:
PHP Fatal error: Call to undefined function event_get_offset() in /var/www/multi5/sites/all/modules/calendar/calendar.module on line 596
Observations:
- happens in Garland not just my custom theme
- calendar will display when empty, this error only occurs when trying to display a calendar view with an event.
- event_get_offset() exists in event_timezones.inc
- niether clearing the views cache, or clearing the cache with devel module helped
Drupal and Module versions:
Drupal 5.x-dev (2007-Jul-19) [using this because 5.1 has profile bugs that cause problems for this site]
Calendar 5.x-1.5
Date 5.x-1.6
Event 5.x-1.x-dev [stable 5.x-1.0 has bugs that cause issues for this site]
Views 5.x-1.6
A lot of different variables to consider here...anyone got any idea where to start looking to correct this? I find it quite odd that the function event_get_offset() exists but is undefined. Is this because calendar includes DATE_TIMEZONES not event timezones at line 595?
Comment | File | Size | Author |
---|---|---|---|
#3 | calendar-tzoffset-fix-0.patch | 638 bytes | adrinux |
Comments
Comment #1
adrinux CreditAttribution: adrinux commentedHere's the view that causes this error, it was working nicely before the module updates.
Comment #2
adrinux CreditAttribution: adrinux commentedAnd here is the CCK field that's displayed on the calendar along with the event start time and title.
Comment #3
adrinux CreditAttribution: adrinux commentedOn closer inspection, and having read a few other threads about tz issues with event, I decided the current include_once for event in calendar is pseudo-code. So I included event_timezones.inc instead, and that fixed the problem for me. No idea whether this is desirable for the event 2.x-dev branch though.
Patch attached.
Comment #4
sunod10 CreditAttribution: sunod10 commentedI had the same problem. I modified the include to:
include_once(EVENT_TIMEZONES);
and then added a corresponding path definition in event.module, to stick to convention:
define('EVENT_TIMEZONES', EVENT_PATH. '/event_timezones.inc');
It did the trick.
Comment #5
Stol CreditAttribution: Stol commentedUsing: calendar.module,v 1.20.2.75
I have the same problem with this version of calendar. I prefer to use the patch of adrinux because only one module needs to be patched.
Regards
Stol
Comment #6
rubenk CreditAttribution: rubenk commentedI reproduced this by selecting
any of the following in the timezone handling of the events section.
-----------------------------------------------------------
Use the time zone of the user editing or creating the event
Allow users to set event time zones
Use the event's time zone
Use the user's time zone
---------------------------
THIS DOES NOT OCCUR if I select the following
Use the sitewide time zone
Use the sitewide time zone
FYI really - does it affect the patch?
Comment #7
rubenk CreditAttribution: rubenk commentedBump! I applied the patch to the calendar.module only (first patch) and it worked. Is it too early to commit.
Comment #8
KarenS CreditAttribution: KarenS commentedDifferent fix applied. This relates to the changes made when timezones.inc was removed from some versions of the event module and the date version of that file got new function names.
Comment #9
(not verified) CreditAttribution: commented