I built a basic chart plugin that uses ChartJS (Chart.js) and the plugin works exactly as planned. However, when I installed the plugin on a WordPress site with the Divi Theme, I found that the builder on the Divi theme crashed every time a new module was loaded on a page.
I wasn’t sure if this was due to some other conflict, so I installed a new instance of WordPress with Divi as the theme and no plugins. I then created a very simple plugin with only one action and that was to load the ChartJS code from a file in the js directory of the plugin. The code I used to load ChartJS is:
wp_enqueue_script( ‘my-test-chart’, plugins_url( ‘js/Chart.bundle.min.js’, __FILE__), array( ‘jquery’ ), ‘0.1.1’, true );
Now, with only Divi and ChartJS present the Divi builder still fails every time unless I deactivate the plugin.
Has anyone experienced a similar problem? Please advise if you have any ideas that may help.
Read more here:: ChartJS causes Divi Builder to crash