Closed (fixed)
Project:
Countdown
Version:
8.x-1.11
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
21 May 2012 at 01:02 UTC
Updated:
28 Aug 2025 at 00:02 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
burt.lo commentedI'm new to this kind of problem. I had an issue in the 6.x version which a friend fixed by loading the js library after(?) the loading of another library.
From that, I've been trying to solve this 7.x problem by explicitly adding the js to the home page template, as in this "page--front.tpl.php" file from the 7.x Blue Masters theme... (oh, I copied the "countdown.js" file from the countdown module's directory into the theme folder, just for debugging):
This doesn't work, but it's what I'm trying at the moment. More later.
Comment #2
burt.lo commentedHere's a patch to get this 7.x-1.0-alpha1 version working. This works on my Blue Master theme here: http://www2.ironmicrophone.com.
It addresses a couple things:
<em>tags in order for the JavaScript code to locate them in the object model (within the for loops around countdown.js lines 28 to 32).HTH.
p.s. It's my first patch... be gentle with me.
Comment #3
deekayen commentedUse 2 spaces instead of tabs
Remove trailing whitespace from lines
Looks like you left a console debug line in the javascript
Comment #4
mahyarsbt commentedComment #5
alex.bukach commentedI confirm the module does not work as expected, I can see that issue in both 7.x and 8.x versions. The JavaScript code expects the numbers be wrapped in 's, however they are not. Fixing it was a part of a @burt.lo's patch in #2. Here's a 8.x patch.
Comment #6
hannakras commentedAlso confirming the module doesn't work as expected. I tested alex's patch (https://www.drupal.org/project/countdown/issues/1591730#comment-15756791) in a sandbox with Drupal 10.3 and branch 8.x-1.x-dev, but the only apparent change was the numbers are now displaying in italics per the tags. The timer is still not counting down dynamically, but only shows a change in countdown time when you refresh/visit the page.
Comment #7
alex.bukach commented@hannakras I suggest you to have a look at https://www.drupal.org/project/countdown/issues/796110 and the MR there. I ended up reworking the whole module.
Comment #8
hannakras commentedThank you, @alex.bukach. I tested your MR, and it is counting down as expected now. I will comment over in that ticket as well.
Comment #9
mahyarsbt commentedThis long-standing issue has been completely resolved in the 8.x-1.11 major refactor.
Solution implemented:
The module now features a brand new CountdownTimer library (vanilla JavaScript, ES6) with:
The JavaScript now properly initializes and continuously updates the countdown display, completely eliminating the "frozen time" issue.
To enable real-time countdown:
Download 8.x-1.11: https://www.drupal.org/project/countdown/releases/8.x-1.11
Please test with the new version. If you encounter any issues, open a new issue with your specific configuration.
Comment #10
mahyarsbt commentedFixed in: 8.x-1.11
Closing this issue as definitively fixed.
What was the problem:
The countdown displayed static time without real-time updates.
How it's fixed in 8.x-1.11:
Key improvements:
Upgrade path:
Configuration:
Simply switch to "Real-time JavaScript countdown" in block settings to enable the dynamic countdown feature.
The architecture has been completely modernized to prevent this issue from recurring. Should you experience any problems with the new implementation, please open a new issue with:
Thank you for your patience with this long-standing issue. The wait is over - real-time countdown is here!