#4288 closed defect (fixed)
"uri" parameter is not defined in scope of method
Reported by: | guest | Owned by: | James Burke |
---|---|---|---|
Priority: | high | Milestone: | 1.0 |
Component: | Loader | Version: | 0.9 |
Keywords: | uri not defined, cross-domain | Cc: | [email protected]… |
Blocked By: | Blocking: |
Description
method:
dojo.xdIsXDomainPath
makes a reference to a parameter "uri", which is not defined anywhere in the scope of the method. This causes a crash and the inability to load a cross-domain module.
patch:
replace uri with this.baseUrl
Change History (4)
comment:1 Changed 15 years ago by
Component: | Core → PackageSystem |
---|---|
Milestone: | → 1.0 |
Owner: | changed from anonymous to James Burke |
Status: | new → assigned |
comment:2 Changed 15 years ago by
Company name removed for privacy purpose:
I've replaced all occurrences of my company's name with {company} or something to that nature. This script is located in a file that will be served neither from my company's CDN and not from AOL's CDN but rather from a third party. Also note the comments i've placed inside the djConfig in order to indicate what works and what doesn't.
djConfig = {
isDebug: false, useXDomain: true, xdWaitSeconds: 10, baseUrl: "http://{company CDN}/", modulePaths: {
company: "http://{company CDN}/{path to company}" This works (our hack) company: "/{path to company}" this causes a crash, is how we would expect it work
}
};
</script> <script type="text/javascript" src="http://o.aolcdn.com/dojo/0.9.0/dojo/dojo.xd.js.uncompressed.js"></script> <script type="text/javascript">
dojo.require("{company}.widget.AbstractObject?");
dojo.addOnLoad(
function() {
var abstractClass = new {company}.widget.AbstractObject?("/search?", true); dojo.byId("test").innerHTML = abstractClass.getServerBase();
});
</script>
comment:3 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:4 Changed 15 years ago by
Thanks for the test scenario, that really helped! Should be fixed now.
Yes, that does look broken, but can you provide more info on how you hit the error case? I'm able to load modules from the the AOL CDN fine.
Is it a problem when you have a mix of remote and local files? It would be good to get a sample djConfig that you used, as well as the kind of dojo.require call that breaks so that I can properly reproduce the problem.