Hi,

I've got the timer showing properly for logged-in users, but when I log out it disappears and the following code is shown in source:

<section id="block-jquery-countdown-timer-jquery-countdown-timer" class="block block-jquery-countdown-timer block-jquery-countdown-timer block-jquery-countdown-timer-jquery-countdown-timer even">
<div class="block-inner clearfix">
<h2 class="block-title">App launch in</h2>
<div class="content clearfix">
<div id="jquery-countdown-timer"></div>
<div id="jquery-countdown-timer-note"></div>
</div>
</div>
</section>

Can't find anything in permissions or block configuration that seems like it would be causing the problem.

Website is www.happyherbcompany.com
Any ideas?
Thanks!

Comments

Miszel’s picture

Hi,

I suspect this is because you have javascript errors on the page. From Firebug:

Please specify a ShareThis Publisher Key 
For help, contact <email address omitted>

buttons.js (line 1)

Error: Permission denied to access property 'toString'
[Break On This Error] 	

...(v){s=v.arguments?'chrome':v.stack?'firefox':window.opera&&!('stacktrace' in v)?...
willhowlett’s picture

I'm getting the same issue, but haven't got any javascript errors.

In my case countdown element displays correctly on the first page loaded as an anonymous user (which would then get cached), but then doesn't show on any of the other pages the block is set to appear on.

I've tried clearing the site's cache (which allows me to visit another page, where the timer then works, but then further pages experience the same problem). I've also tried disabling aggregating JS, which makes no difference.

edit:

Changed line 27 of jquery_countdown_timer.module from:
'cache' => DRUPAL_CACHE_GLOBAL
to:
'cache' => DRUPAL_NO_CACHE

then cleared the site cache. This fixed the problem for me (would assume turning block cachin off on the Performance page would do the same thing, but this seems a better approach as it allows you to still cache other blocks)

ignelius’s picture

Working now, looks like it was possibly caused by malfunctioning Sharethis module or Firefox addons.
Thanks!

Miszel’s picture

Title: Countdown timer block not showing for logged-out users » Countdown timer block not working with block cache on

@willhowlett

The block should be cacheable globally.

I fixed it using the #attached property.

Commited to 7.x-1.x

If you could test it, that would be graet.

Miszel’s picture

Status: Active » Fixed
willhowlett’s picture

Yup, works now. Many thanks!

Miszel’s picture

Status: Fixed » Closed (fixed)

Thanks. Included in 7.x-1.4