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:
------------------------------
Roger van Valen
Senior manager, software engineering
Rocket Software
Dordrecht, The Netherlands
------------------------------