I installed the module and created a block. However, I can only see the countdown when I am signed in. Anonymous users don't see the code, just the block with its title, nothing else. I did not see any permissions that I could set.
Does anyone have any ideas?


Blackice2999’s picture

Category:bug» support
Status:Active» Postponed (maintainer needs more info)


right the module doesn't has any permissions. It sounds like a cache or javascript problem.


kerasai’s picture


I'm running into the same problem. With no caching or css/jss aggregation everything runs fine. When I went to configure the caching settings is when I noticed the error. The div ends up empty and it seems to only affect anonymous users. Firebug is giving the following Javascript error:

countdownwidth is not defined, line 9 of countdown_timer.js

I am able to get around it by disabling block caching at admin/settings/performance. In my case, it's not a huge deal as most of my traffic is anonymous and hits the cached page, but it would be nice to get this working properly. Any ideas?


Blackice2999’s picture

Category:support» bug
Status:Postponed (maintainer needs more info)» Active


thanks for the informations it sound like a bug i will need to do some tests.


tanjerine’s picture


Some more detail. It seems to work on Chrome (for both logged in and anonymous users) but not on Firefox 6 (for both logged in and anonymous users). Both with caching and no-caching enabled.

I also tried the js script bypassing the module and it works on FF:

var newYear = new Date();
newYear = new Date(newYear.getFullYear() + 1, 1 - 1, 1);
$('#defaultCountdown').countdown({until: newYear});

$('#removeCountdown').toggle(function() {
    function() {
        $('#defaultCountdown').countdown({until: newYear});
Blackice2999’s picture


i don't get it reproduced i tried with cache and css/js file aggregation turned on and countdown block works fine on FF 5.01 & FF 6.01. Its works also fine without jquery_update.

In comment #2 is talked about countdown_timer.js but we don't have this file in the module and this file is not exists in the library...

need more informations like an link to the problem page.

jackfoust’s picture

Have this issue too, if a role does not have permission for view date repeats then the block will not display for that role.

EDIT - I thought what I mentioned previously was working for me and it wasn't. I had to disable block cache as mentioned above to get this to display for anonymous users.

kerasai’s picture

Status:Active» Needs review
new1.16 KB

This has been bugging me for a long time so here are the steps to reproduce:

  1. Fresh install of Drupal 6.26
  2. Install admin_menu and devel modules
  3. Install 6.x-1.x-dev version of jquery_countdown
  4. Create a countdown block, place it in any region

I tried this with various combinations of page and block caching, as well as authenticated and anonymous users. The issue only appears for anonymous users when page caching is disabled and block caching is enabled. CSS/JS aggregation had no effect so I believe it along with the javascript error mentioned above were red herrings.

For this problem case, on first render everything appears as expected and subsequent renders the markup of the block appears just as before--just no timer displaying.

What's going on there is that the function that inserts the javascript to initialize the countdown timers is tucked inside the theme() function that generates the content for the block. When the content of the block is returned from the block cache that theme() function is bypassed and the javascript needed to initialize the timer is not added. On pages served from the full page cache, the javascript is included in the cached page.

Symmary: Sorry for being so long-winded, but the short version is I don't think this block can be cached due to this scenario. I think the best solution is to change this to a non-cached block so this module can be used with the block cache enabled.

Attached is a patch that will change this to a non-cached block. I ran through all the same testing with the patch applied, and the timer appeared in all cases.