Opened 8 years ago

Closed 8 years ago

#14619 closed defect (invalid)

Problem with setting dojoConfig.packages, loading dojo with IE in async loading mode

Reported by: denglerj Owned by: Rawld Gill
Priority: high Milestone: 1.7.2
Component: Loader Version: 1.7.1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Loading dojo in the new (recommended) way for enabling async. loading, e.g. like this (controlled by JSP) doesn't work with IE (with Firefox there are no problems):

<script>
 var dojoConfig = { async:<%=async%>, parseOnLoad: true, packages: [
        {name: "generic",location: '<%=rootPath%>/modules/generic'},
        {name: "storage",location: '<%=rootPath%>/modules/storage'},
        {name: "appl", location: '<%=rootPath%>/appl'},]};    
 </script> 
 <script type="text/javascript" src="<%=dojoPath%><%=dojoFile%>">  </script>

The loading process stops in dojo.js at the first line of "fixupPackageInfo" (Line 472 of dojo.js in the source release):

fixupPackageInfo = function(packageInfo, baseUrl)

	var name = packageInfo.name;


....
}

This is because by some reason it may happen that packageInfo can be null. Then IE complains and stops. A quick fix which solves the problem in my application is:

var name = packageInfo?packageInfo.name:null;

I am aware, that the root cause of the problem may possibly be somewhere else (that would have been to hard to debug). Nevertheless I would greatly appreachiate a standard solution, because otherwise I can't deliver an asynchroneous Version of the program.

Thanks, Joachim Dengler

Change History (4)

comment:1 Changed 8 years ago by bill

Component: CoreLoader
Description: modified (diff)
Owner: set to Rawld Gill
Priority: highnormal
Summary: Problem loading dojo with IE in async loading modeProblem with setting dojoConfig.packages, loading dojo with IE in async loading mode

comment:2 Changed 8 years ago by ben hockey

try fixing your stray comma and see if the problem goes away:

{name: "appl", location: '<%=rootPath%>/appl'},]}; 

// should be

{name: "appl", location: '<%=rootPath%>/appl'}]}; 

comment:3 Changed 8 years ago by Rawld Gill

Milestone: tbd1.7.2
Status: newassigned

comment:4 Changed 8 years ago by Rawld Gill

Resolution: invalid
Status: assignedclosed

Thanks neonstalwart!

Joachim:

If this is a real problem, please provide a reduced test case with actual parametes. Debugging indirect code via a JSP template is not something we have time for gratis.

Note: See TracTickets for help on using tickets.