WordPress 4.1 upgrade broke DoJo integration
-
I’m running a WordPress website which uses both jQuery and DoJo (part of the ArcGIS JS API, loaded from https://js.arcgis.com/3/12/).
After recently upgrading from WordPress 4.0.1 to 4.1, things broke.
Dojo is returning multiple Error: multipleDefine errors.Basically it looks like DoJo tries to load a new instance of jQuery, which it shouldn’t, since WordPress has loaded jQuery already and there isn’t a jQuery module available in the DoJo map. Furthermore, this issues seems to only exists in WordPress, not in a jsfiddle I made including exactly the same scripts.
For debugging purposes I first disabled all WordPress plugins, without any result; the problem kept existing. I went on and found a couple of interesting things. But I’m really stuck in the further debugging proces. I know the scope of this question is rather broad, but any thoughts at all are very much appreciated.
*What I know so far/that i’m wondering about:*
-Things stopt working after upgrading to WordPress 4.1
-In the info of the multipleDefine error it states https://js.arcgis.com/3.11/jquery.js, which is weird: it shouldn’t be looking for jQuery there, since it’s already included in WordPress
-Things break as soon as I included the ArcGIS Javascript API, which includes DoJO, but only in WordPress; on a jsfiddle things work fine https://jsfiddle.net/dhunink/mry5vn3s/7/
<script>
var dojoConfig = {
isDebug: true,
async: false
};
</script><script src=”https://js.arcgis.com/3.12/”></script>
The things mentioned above leads me to the conclusion that something changed in the last WordPress release that effects my script, although I can’t find anything in the release notes that could be linked to my issue.
Any thoughts, suggestions of comments are highly appreciated! Feel free to see all in action at https://tpgrf.nl/testserver/alpha/topotrainer/provincies/.
Error screenshot: https://i.stack.imgur.com/za1ge.png
False loading screenshot: https://i.stack.imgur.com/3Vqyr.png
- The topic ‘WordPress 4.1 upgrade broke DoJo integration’ is closed to new replies.