Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I'm developing a mashup and, at the same time, I need to use version 4.0 of the bootstrap.
However, by including the bootstrap javascript file, an error occurs in the require.js file, possibly due to the incompatibility of the two files (bootstrap.js and require.js).
When I create a new mashup from scratch, it uses version 3.3.7 of the bootstrap.
Does anyone know what the error might be when I use version 4.0 of bootstrap? Have you been through this?
Note: Here is an attached image of the error that happens.
Hi Felipe,
I came across this some time ago, with an earlier version of Bootstrap 4. The problem is that Bootstrap 4 needs a newer version of jQuery, and the jQuery that is bundled with Qlik Sense (actully in the requirejs file) overwrites that one.
I don't know if my solution is the best, there might be a more elegant one, but I did like this, basically saving the Bootstrap4 jQuery instance before loading the qlik version, and then restoring it:
<script src="node_modules/tether/dist/js/tether.min.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<script>
window.jQueryB = window.jQuery;
</script>
<script src="../../resources/assets/external/requirejs/require.js"></script>
<script>
window.$ = window.jQuery = window.jQueryB;
</script>
Hope this helps
Erik Wetterberg
Hi Felipe,
Qlik Sense is using jquery 3.0 and there is a known compatibility issue between bootstrap 4 and jquery 3 =>
https://github.com/twbs/bootstrap/issues/19433
Maybe that's the issue
I hope this helps
Hi Felipe,
I came across this some time ago, with an earlier version of Bootstrap 4. The problem is that Bootstrap 4 needs a newer version of jQuery, and the jQuery that is bundled with Qlik Sense (actully in the requirejs file) overwrites that one.
I don't know if my solution is the best, there might be a more elegant one, but I did like this, basically saving the Bootstrap4 jQuery instance before loading the qlik version, and then restoring it:
<script src="node_modules/tether/dist/js/tether.min.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<script>
window.jQueryB = window.jQuery;
</script>
<script src="../../resources/assets/external/requirejs/require.js"></script>
<script>
window.$ = window.jQuery = window.jQueryB;
</script>
Hope this helps
Erik Wetterberg
Not sure, may be this helps:
https://www.syncfusion.com/forums/135709/bootstrap-4-0-compatability
I implemented your help and it worked !!
Thank you!