I think I've spotted a bit of a problem with worldclock.js. I have a pretty vanilla Drupal 6.10 instance, running the Wabi theme. Worldclock works very nicely, except if I enable "Optimise Javascript files" option in Admin->Performance. If I do that, I find that the times no longer show in the clock.

I suspect this needs a 'proper' solution. I would suggest one option would be to degrade more gracefully if there's no javascript by writing the various times in the HTML that worldclock produces. That will be static, but at least something will be shown. If JS is working/available then those static times will be overwritten with live times later on.

Another option is to ensure worldclock.js plays nicely with other JS. I'm a bit of a JS-no-hoper, so I'm not going to comment on how that might be achieved ;-)

As a workaround, I attach a patch which stops Drupal aggregating the worldclock javascript file with any others. This seems to keep worldclock working, and still ensures a reasonable level of performance. However, it's not a permanent solution.

CommentFileSizeAuthor
worldclock.module.patch431 bytescoofercat

Comments

apratt’s picture

I had this issue too.

Wierd thing was it worked in Firefox but not IE. That may be a clue as to where the problem lies.

http://drupal.org/node/172169 is the Javascipt coding standards for Drupal. I had a quick glance but I'm no great javascipt editor. If I get sometime I'll come back and have a longer look.

Angus

highermath’s picture

Component: Documentation » Code
Priority: Normal » Critical

Please take a look at this. It is a major issue that blocks users from deploying this module on many large and/or complex sites.

I changed the component (was: documentation???) and priority.

This patch is a help, and a reasonable solution. If nobody steps forward to actually fix the problem, could you please commit it?

Thanks!

flevour’s picture

Hi,
I'll be giving a look at the patch shortly,
Francesco

flevour’s picture

Status: Needs review » Fixed

Fixed in version 1.7.

portulaca’s picture

Version: 6.x-1.5 » 6.x-1.7

The clock times are still missing sometimes, I checked and the js file is linked. As far as I can see it always works for user 1, but not always for other roles. I ticked all of the roles on Block visibility settings but the problem is still there.

Status: Fixed » Closed (fixed)
Issue tags: -Performance, -JavaScript, -patch, -worldclock, -aggregate

Automatically closed -- issue fixed for 2 weeks with no activity.