Active
Project:
Earth Hour
Version:
6.x-1.8
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Mar 2011 at 03:49 UTC
Updated:
26 Mar 2011 at 13:51 UTC
When I enable block caching, the earth_hour.css file is included in the first page request. But when I refresh the page the css file is left off and the message is displayed without css.
I moved the css definition from the earth_hour_block function to the earth_hour_init() function:
function earth_hour_init() {
earth_hour_check_time();
drupal_add_css(drupal_get_path('module', 'earth_hour') .'/earth_hour.css');
}
That seemed to fix it.
Comments
Comment #1
mgiffordThat would have the earth_hour.css file loaded all year around. Now it could well be tied to block caching.
earth_hour_block_view() shouldn't be cached according to earth_hour_block_info().
drupal_add_css(drupal_get_path('module', 'earth_hour') .'/earth_hour.css'); isn't loaded (as it's cached).
d6: http://www.churchillnews.ca
d7: http://openconcept.ca
I'm still looking at this, but it seems like a D7 function snuck into D6:
This is just for the top bar on the page.