Dojo Loader error

25294
18
01-11-2013 11:09 AM
NigelAlford
Occasional Contributor
I'm getting a Dojo Loader error on the ArcGIS js sheet and I can't determine if its myside or ESRI's side causing it. I'm calling ESRI and Jquery in the same HTML page (ESRI/Dojo in the header along with its designated js sheet, seperated to help with any weirdness...) and the Jquery is loaded at the end of the body with its own JS sheet. I'm using Jquery for other functionality pieces and not any map usage.
Everything has been running flawlessly for a few weeks until about 2 hours ago my map won't load and I'm getting this error:

Error {src: "dojoLoader", info: Array[2]}


and this:

GET http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/dojo/jquery.js 404 (Not Found) 


that sheet doesn't exist in 3.3 or 3.2 and I'm not calling that link anywhere in my code
18 Replies
MatthewLawton
Deactivated User
I get this error when trying to load jQuery Mobile. I tried it with Mobile 1.2.0 and jQuery 1.8.3 and also with Mobile 1.3.0 and jQuery 1.9.1, same result. If I comment out the jQuery Mobile reference then the page loads, but of course then I can't use all the cool jQuery Mobile functionality.
0 Kudos
MatthewLawton
Deactivated User
Changing over to the AMD reference style seemed to work for me, but only if I use my local server copy of JS API 3.2. Here is how I am declaring my modules now:

Old way:
dojo.require("esri.map");
dojo.require("esri.tasks.query");
dojo.require("esri.tasks.identify");
dojo.addOnLoad(Init);


New way:
require(["esri/map", "esri/tasks/query", "esri/tasks/identify"], Init());


I'm now running ArcGIS JS API 3.2, jQuery 1.9.1, and jQuery Mobile 1.3.0. The odd thing is that it will not work if I reference the 3.2 or 3.3 API on the Esri servers. It only works if I point to my local version.
0 Kudos
MatthewLawton
Deactivated User
Nevermind, I had another error that was stepping on this one. So the AMD style apparently had no effect. I still have this error.
0 Kudos
SethCrotchett
Emerging Contributor
im having this same issue.  Any solution yet?
0 Kudos
SteveCole
Honored Contributor
Have you verified your JS code through JSLint or something similar to make sure there aren't any other syntax issues? I was migrating a v2.8 app to 3.3 that loads Jquery 1.8.2 and I was getting an error like you described and it was driving me crazy. Turns out I had some other sort of JS syntax error that manifested itself as this jquery error inside the javascript API.

Good luck!
Steve
0 Kudos
DennisHunink
Deactivated User
Have you've been able to fix this issue?
0 Kudos
JonathanUihlein
Esri Regular Contributor
Have you've been able to fix this issue?


What issue are you having dhunink?

This is quite an old post and several versions of the JSAPI have come out since.
0 Kudos
DennisHunink
Deactivated User
Hi Jon,

thanks for your reply.
I'm experiencing the same problem as the topic starter did; my web-app gives an error and is looking for a non-existing jquery file in the ArcGis Javascript API.

I figured out what triggered it. The web app is on a wordpress installation. One worpdress plugin, Contact Form 7, is loading some custom jQuery files. If this plugin is enabled, the error occurs. If the plugin is disabled, the error doesn't occur.

To illustrate:
Working (plugin disabled): http://topografieindeklas.nl/topotrainer/provincies/
Error (plugin enabled): http://tpgrf.nl/testserver/alpha/topotrainer/provincies/

I believe the main question here is: what makes the ArcGIS API or DoJo looking for a jQuery file?
0 Kudos
JonathanUihlein
Esri Regular Contributor
I think it probably has to do with either your dojoConfig object, or the inclusion order of your script files.

Try loading all of your scripts in the <head>, rather than some in the <body> as you have now.

Also, make sure your dojoConfig object is properly set (especially since you are using the legacy style of dojo, rather than the preferred AMD style).

Lastly, check this page from stackoverflow for more details:
http://stackoverflow.com/questions/2850314/jquery-dojo-how-do-i-use-jquery-with-dojo-toolkit
0 Kudos