Uncaught TypeError: this._addClass is not a function

#_addClass#this#uncaught

Error:

Uncaught TypeError: this._addClass is not a function

 

Issue:

When opening the imgMCE editor and select an image size the screen just becomes blank and nothing will load.

 

Cause:

This error is usually caused when another plugin or theme is loading the default Wordpress script:

wp_enqueue_script('jquery-ui-sortable');

It’s most likely a conflict with the jquery-ui.js file that get’s loaded by the gradient color picker “ColoringPick” which uses jquery-ui v1.12.1.

WordPress uses an older version of the script and those two maybe conflicting when loaded on the same page.

 

Workaround:

Find the plugin/theme that’s calling the script wp_enqueue_script(‘jquery-ui-sortable’); and uncomment the line.

If after uncommenting the line the functionality of the 3rd party plugin or theme stops working make sure the script get’s loaded on the necessary pages only instead of every page.