Login Register

Error in Explorer: "Bundle not found : loading in dijit ,locale=en"

After completing a simple build on my dojo script (I just needed to include the accordion script) I'm receiving an error message on IE 6: "Bundle not found loading in dijit ,locale=en." I assume this means that something isn't loading before a request is being made.

I'm a newbie here, so I'm not even sure where to begin to debug this problem.

I saw this post from 3 months ago, but the poster never followed up with additional info. I tried his hack at it, but that did not produce any results.

BTW - the site works fine in Firefox.

Does the error happen in

Does the error happen in Firefox? If so, then you can use Firefox with Firebug to see the network requests to find out what file it is looking for (there should be a 404 for something).

If only everyone used Firefox...

..instead of IE.

Of course, the bug only occurs in IE.

You may want to confirm that

You may want to confirm that you're referencing the AccordianContainer widget correctly. The following code works for me.

<script type="text/javascript"
    src="../dojo-release-1.1.0/dojo/dojo.js"
    djConfig="parseOnLoad: true, isDebug: true, debugAtAllCosts: true">
</script>

<script type="text/javascript">
    dojo.require("dijit.layout.AccordionContainer");
</script>

I'm using a custom built script....

..meaning I've used the buildscript folder (under the "util" folder) to build and shrink a script for my site in order to optimize the downloading process.

http://dojotoolkit.org/book/dojo-book-0-9/part-4-meta-dojo/package-syste...

I actually have two scripts for two different pages in my site- one is built just using Accordion Container dijit; the other includes the accordion container and and the tooltip dijit.

On both pages, the accordion script breaks in Internet Explorer.

I believe the accordion works in IE when I reference the container script like you have here. I just dont get the optimized download speed from a custom built script.

I don't know where to begin to debug this.

Here's something interesting to add...

Above, I said this looked like an Internet Explorer problem. That may only be partially true.

I've encountered this bug on IE running on various machines (I've checked 5 different desktops/ laptops), but today I found a computer where the bug doesn't occur on IE and the page works just fine..

What makes this particularly puzzling is that I'm getting two different results using two computers which are the exactly same type of model, using the same type of monitor, running the same version of IE. In fact both computers were deployed at the exact same time just last week. One computer gives me an error and stops the script; the other works perfectly.

How can two computers running the same system, using the same version of IE produce such varying results?

IIRC, you need to make sure you deploy...

...the resource bundles included with a dojo build. I ran across a very similar problem when creating a build for the API Tool, and it turned out I didn't copy over the built bundles that live in dojo/nls. You might want to try that and see what happens.

the nls files are copied over..

They are uploaded on the server, but for some reason the built file: dojo.nls.[filename]_en-us.js will not load into the browser.

The file is there on the server. I'm only using lowercase letters (no symbols) in my filename.

Any other guesses?

It would be good to use an

It would be good to use an HTTP proxy to see the requests for the dojo.nls file to see if it is trying to grab it from the right location. You can also then compare any HTTP headers with a working version, that might provide insight. Charles is a decent HTTP proxy.

I tried the Charles HTTP proxy...

... on my mac where the website works properly (w/ firefox). The file, dojo.nls.filename_en-us.js, is being uploaded correctly.

This evening I will have access to a pc with internet explorer, and I will try Charles there... If Charles shows that the browser is attempting to access the *_en-us.js from the correct location, but the file still isn't loading, what then?

Here is my build profile for a simple accordion script:

dependencies ={
    layers:  [
        {
        name: "filename.js",
        dependencies: [
            "dijit.layout.AccordionContainer"
			]
        }
    ],
    prefixes: [
        [ "dijit", "../dijit" ]
    ]
};

Am I leaving something out? Should have I included other resource folders in the build?

try loading the file on your page by inserting a SCRIPT tag

Sometimes that will help identify errors. Just wondering if you're getting bitten by an extra comma somewhere, perhaps, or something else which is causing a syntax error?

try changing the djConfig.locale

We had the same issue.
Recently we had updated the dojo to 1.1 version.

Earlier we had given djConfig.locale = "en" and it was working fine.
After the update we got the same error
"Bundle not found loading in dijit ,locale=en."

On Changing the value to djConfig.locale = "en_US" it worked fine.

doesn't make sense

en_US isn't a valid locale in Dojo. Dojo uses all lowercase and hyphens instead of underscores (e.g. en-us) so this is effectively an unrecognized locale, which should fall back to root. So should 'en', since ROOT is typically the English translation.