Incompatible with caching

hayesr - February 4, 2008 - 22:16
Project:jQuery Calendar
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:reviewed & tested by the community
Description

On line 195 a function is defined called jquery_calendar_init(). This implements hook_init() —which I don't think you meant to do, because you're calling it correctly from hook_menu(!may_cache). Anyway, there are functions used in jquery_calendar_init() that are not available at the hook_init() phase of the bootstrap process. This results in fatal PHP errors when caching is on.

The fix is simple, I just renamed jquery_calendar_init() to jquery_calendar_initialize() on lines 70 and 195.

AttachmentSize
jquery_calendar_cache_compat.patch804 bytes

#1

mohanjith - March 13, 2008 - 08:31
Status:needs review» reviewed & tested by the community

Without the patch jquery_calendar fails with "Fatal error: Call to undefined function t() in /home/httpd/test.wso2.org/modules/jquery_calendar/jquery_calendar.module on line 202" when an anonymous user access the site while caching is set to normal.

Applying the patch solves the issue. Thanks hayesr.

The patch looks like it is good to be comitted.

#2

marvinq - April 25, 2008 - 16:47

Sorry if this is a really stupid question. But how do I apply the patch?

#3

mohanjith - November 11, 2008 - 01:27
 
 

Drupal is a registered trademark of Dries Buytaert.