Tuesday, March 17, 2009

Invisible Dojo 1.3 Calendar in Chrome, Safari

So we've been experimenting a bit recently with the Dojo Framework, a Web 2.0 JavaScript toolkit.

Specifically, we were interested in the Calendar widget, which is part of the Dijit package.

After a bit of poking and prodding, we were able to get the widget working. Great!


Much to our dismay, however, in the Chrome and Safari browsers, we were getting script errors and our slick new calendar was not showing up at all.

My first crack at fixing this issue (and in fact my motivation to write this blog entry) was to run some Google searches to see if anyone else was having the same problem. I am the first to admit that I am no Google wizard, but my best shots at combining "dojo", "dojo 1.3", "calendar", "chrome", "safari", "bug", "invisible".... all turned up unhelpful links.

Thus, it was time to step into the code. This was my first foray into debugging in Chrome, and with a lot of banging at the console command line and a little help from a post by Eric Pascarello, I was able to trace the bug down to a null return from the dojo.query() function.

Now a second round of Google searches incorporating "dojo.query" instead of "calendar", and bang! The first result was a link to Ticket 8775 in the Dojo TRAC, whose title is "REGRESSION: Camel Cased classname queries fail on Safary [sic] 3.2.2 and Chrome".

Well what do you know. It turns out we were just a little behind the times. We were working off of the 1.3 beta 1 release. The bug had since been tracked down and fixed... and all we had to do to get our calendar to show up in Chrome and Safari was to upgrade to 1.3 RC1 (The most recent release at the time of this posting).

So voila! Hopefully there's enough relevant keywords in here that all the other folks out there running on one of the 1.3 betas might find this and realize it's time to upgrade!

Cheers to the dojo community for putting together such a great product, and for really being on the ball with finding and fixing bugs like this.


No comments:

Post a Comment