Login Register

Exception... "'Error: Bundle not found: gregorianExtras in dojo.i18n.calendar , locale=sv-se' when calling method: [nsIDOMEventL

Hi!

My clock widget don't work when deployed to a public site, however it works fine on my local PC. From the error message it looks like something is missing, but I can't find any difference between the local and the public site. What could be wrong?

Public test:
http://www.0708-harald.se/index_clock.html

Local test: (is not always on-line):
http://213.238.213.41//0708harald/index_clock.html

I get a JS error on the

I get a JS error on the public one... dealing with i18n files... did you copy the full dojo dir to the web host?

-Karl

Hi, Karl, no I did not copy

Hi, Karl,

no I did not copy everyting, as I have limited space on the public site. But I use the same reduced set of files on my local machine. And the i18n library is complete. I'm confused.

Ok, now everyting is copied,

Ok, now everyting is copied, but I still get the same script error on the public site.

I have dojo.js in the www folder and in src everything else. I don't understand why it's working locally but not on the external site.

Any Idea?

After doing a build, if you

After doing a build, if you included your clock widget in the custom build, then there will be a top-level nls directory (sibling of src/) that includes some flattened i18n bundles. Make sure that one is up on the website too.

Actually I just copied all

Actually I just copied all source files from the downloaded zip file, so I didn't make my own build. Do I need to create a build, or is it ok just using the sources?

Ok, the site is now up and

Ok, the site is now up and running. The problem was caused by the following code:

text_time.innerHTML = dojo.date.format( time, {selector: "timeOnly", timePattern: "h:mm:ss a"});

I just removed it until I got the hang of it. I realize that the call causes some locale settings to be used.

Questions:

1. When making a dojo build will the site only need the dojo.js file and the nls dir (src is not needed)?
2. How is the locale set?
3. timePattern for a 24-hour clock?

/Thanks!

For #1, in general it is

For #1, in general it is suggested that you copy everything in the custom build output, since some things like widgets have images that are in the src directory that are needed for the widget to display properly. I do not know the answer to #2 or #3.

Are you mixing different

Are you mixing different dojo versions?
gregorianExtras.js was removed from http://trac.dojotoolkit.org/changeset/7382
hth,
nic