Opened 11 years ago

Closed 11 years ago

#11249 closed defect (fixed)

Dijit Documentation bug - dijit.Tree examples not working in IE8 or Firefox 3.6

Reported by: wfurman Owned by: dante
Priority: high Milestone: 1.6
Component: Website Version: 1.4.0
Keywords: Cc:
Blocked By: Blocking:


The dijit.Tree examples does not work in CodeGlass? at this URL.

This appears to be a general problem - maybe all browsers. It appears that the path to the data store is incorrect. Here is the path as it appears in the code snippet from CodeGlass? for the "A Programatic Tree" example.

dojo.addOnLoad(function() {

var store = new{

url: "../_static/dojo/dojo/dijit/tests/_data/countries.json"


When I tested this URL directly it returned nothing, but when I removed one of the 2 "dojo" directories I was able to load the JSON for the data store.

Here is the URL that worked.

When I enter that URL in manually in my browser, it returns the json for countries.

I dug a little further and it appears that examples are broken as well.

Once I rebuilt the example page for dijit.Tree on my own server and copied the countries.json file to my server, the examples worked properly in both IE 8 and FireFox? 3.6.

Change History (5)

comment:1 Changed 11 years ago by bill

Component: GeneralWebsite
Owner: changed from anonymous to Dustin Machi

Oh, it's a problem w/copying the doc from to

comment:2 Changed 11 years ago by timtoo

I've also been struggling with the examples on the web site. Specifically the examples for dijit.form.FilteringSelect? which use a datastore.

comment:3 Changed 11 years ago by dante

Milestone: tbd1.6
Owner: changed from Dustin Machi to dante
Status: newassigned

FWIW, I've fixed this locally (and in the moin wiki).

In CodeGlass viewers you can use {{dataUrl}} and {{baseUrl}} as filler. It will point to the right place across versions and whatnot. {{dataUrl}} basically points to dojo_root, eg: {{dataUrl}}dijit/tests/data/countries.json

We've meticulously changed all these references in MoinMoin (wiki), and the 1.5 version of the doc export seems to work. I am testing whatever links I've seen reported broken, and thus far everything is working out. This should solve 80% of the outstand "broken doc examples" as a result of the copy to static files.

Seems in doing this I've also made the doc tree work entirely offline.

As an aside, I've removed jQuery from the sphinx output. Still need to port ~ 200lines of JS and we'll be golden.

comment:4 Changed 11 years ago by dante

to clarify, {{dataUrl}} is whatever LOCAL js/ folder you have. reference-guide has a _static/js/dojo/ built in, and dojocampus has /moin_static165/js/dojo/trunk ... by using the variable in codeGlass you do not need to use absolute urls any long.

CSS resources should be baseurl, eg, ExpandoPane:

@import "{{baseUrl}}dojox/layout/resources/ExpandoPane.css"

will properly import a local or CDN version of the expandopane css into codeglass.

dataUrl is meant for things that cannot be accessed x-domain. {{dataUrl}}dojo/dojo.js is the root.

comment:5 Changed 11 years ago by dante

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.