Opened 14 years ago

Closed 14 years ago

#6358 closed defect (fixed)

the XD Loader doesn't load the modules properly when working on a source or custom tree

Reported by: guest Owned by: James Burke
Priority: high Milestone: 1.1.1
Component: Core Version: 1.1.0
Keywords: xd loader, debugAtAllCosts Cc: [email protected]
Blocked By: Blocking:


The XD Loader while loading considers that if the passed address is not a full uri then it simply append the base url to it. Actually it should do it the way the regular loader does i.e. also check if the passed url is relative or absolute and append it appropriately.

eg: if I map the module path to /my/module it should fetch the modules files from http://server/my/module but it tries to get it from http://server/app/dojo/my/module

For the same reason we are not able to use debugAtAllCosts on a source tree where custom module is placed outside the dojo folder.

The solution for this should be simple on lune number 114 in loader_xd.js instead of

var uri = this.baseUrl + relpath;

it should be

var uri = ((relpath.charAt(0) == '/' || relpath.match(/^\w+:/)) ? "" : this.baseUrl) + relpath;

as is in loader.js

kind regards, Rohit (rohitbrai at gmail dot com)

Change History (3)

comment:1 Changed 14 years ago by James Burke

Milestone: 1.1.1
Owner: changed from anonymous to James Burke
Status: newassigned

comment:2 Changed 14 years ago by James Burke

(In [13550]) Refs #6358: xdomain loader did not handle module paths starting with /. Matching loader.js behavior and removing some cruft. \!strict for redeclarations.

comment:3 Changed 14 years ago by James Burke

Resolution: fixed
Status: assignedclosed

Hmm, trac update from commit not working? This is fixed in trunk, r13551.

Note: See TracTickets for help on using tickets.