incompatible with page cache

moshe weitzman - May 1, 2006 - 02:29
Project:Auto Time Zone
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

autotimezone uses hook_init() for putting js into the page. Thats OK, but it runs even for cached pages and in that case, url() is not available yet. The attached patch moves all processing to hook_menu(!$may_cache) so is a performance improvement (runs only on non cached pages) fixes this bug.

If you wanted to clean up further, use addLoadEvent() as per http://drupal.org/node/22218#hook_onload. Your js function would presumably request an image or inject a stylesheet via the DOM.

AttachmentSize
patch_382.47 KB

#1

moshe weitzman - May 5, 2006 - 12:55
Status:reviewed & tested by the community» fixed

applied patch so that large sites can use this module

#2

LukeLast - May 5, 2006 - 15:04

Cool.

#3

Anonymous - May 19, 2006 - 15:15
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.