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 |
Jump to:
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.
| Attachment | Size |
|---|---|
| jquery_calendar_cache_compat.patch | 804 bytes |

#1
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
Sorry if this is a really stupid question. But how do I apply the patch?
#3
See http://drupal.org/node/60108