Skip to main content

We were notified by customers that they have been using Dojo charts in their Rocket MX Web solution, and as of an upgrade to Rocket MX Web version 10.3.x these did no longer appear. There was also no browser console error displayed.

After analysis we found out that the root cause is the update of our internal Qooxdoo framework to version 7.5. It turns out there is an incompatibility between Qooxdoo 7.5 and the Dojo charts version 1.7 and up. Both of these components define a javascript function by the nameĀ require()and this causes a conflict.

The conflict can be relatively easy be fixed by adding a prefix to the original function.

In the index.html or index.jsp, prior to loading the web client in startClient()Ā  (which will load the Qooxdoo framework), this code can be added:

   <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/dojo/1.9.2/dojo/dojo.js"></script>
   <script type="text/javascript">
 	let dojocharts = {
 		require : require
 	};
    

This would look like this:

From now, you can use dojocharts.require() instead of the regular require() function call to work with the Dojo charts.
That would look like this - see the old code commented out:
This last fix would need to be applied to all webpages and/or client side JavaScripts where the dojo require() function was used with the callback function. Calls that usedĀ dojo.require() should nog be changed..
This fix will make sure your dojo charts will become visible again.

------------------------------
Roger van Valen
Senior manager, software engineering
Rocket Software
Dordrecht, The Netherlands
------------------------------