Opened 11 years ago
Closed 11 years ago
#14403 closed defect (duplicate)
Error using dojo-combo-api with IE
Reported by: | Akira Sudoh | Owned by: | Rawld Gill |
---|---|---|---|
Priority: | high | Milestone: | 1.7.1 |
Component: | Loader | Version: | 1.7.0 |
Keywords: | Cc: | ddumont | |
Blocked By: | Blocking: |
Description (last modified by )
When dojo-combo-api is used with IE, I got “irrationalPath” error in getModuleInfo_() function, and therefore modules could not be loaded.
The stack is like:
getModuleInfo_(mid = "../has", referenceModule = "dojo/_base/array", …) getModuleInfo(mid = "../has", referenceModule = "dojo/_base/array") getModule(mid = "../has", referenceModule = "dojo/_base/array") defineModule(module = "dojo/_base/array", deps = [[object Object], "../has", "./lang"], …) def([[object Object], "../has", "./lang"], …) JScript global code injectUrl(…) (req.combo.done's callback)(…) req.combo.done(…) comboPendingTimer()
It appears that a module structure is expected for the 2nd parameter (referenceModule), though in above case it’s string. Such string seems to be from combosPending variable (which is an array), generated at:
req.combo.done(function(mids, url) { (snipped...) combosPending.push(mids); (snipped...) }, req);
And elements in combosPending goes to defineModule()’s 1st parameter by the following code:
// IE path: possibly anonymous module and therefore injected; therefore, cannot depend on 1-to-1, // in-order exec of onLoad with script eval (since it's IE) and must manually detect here targetModule = targetModule || injectingModule; if(!targetModule){ (snipped...) if(has("dojo-combo-api") && !targetModule){ for(var i = 0; i<combosPending.length; i++){ targetModule = combosPending[i]; if(targetModule.node && targetModule.node.readyState === 'interactive'){ break; } targetModule= 0; } } } if(has("dojo-combo-api") && isArray(targetModule)){ injectDependencies(defineModule(targetModule.shift(), args[1], args[2])); if(!targetModule.length){ combosPending.splice(i, 1); } }
In above code, it appears that usage of combosPending is the only case targetModule being an array, so getModule() against targetModule.shift() seems the solution, which solved the error in my case.
Attachments (1)
Change History (6)
Changed 11 years ago by
Attachment: | dojo.js.patch added |
---|
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Cc: | ddumont added |
---|---|
Priority: | highest → normal |
severity: | blocker → major |
also, please don't use highest/blocker, as they are not accurate for the Dojo project in general
comment:3 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:5 Changed 11 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
dup of #14198?