The select2(destroy) method was called on an element that is not using Select2.

I receive this error and then a whole bunch of those: RGX.Transaction_NewEdit.dataView1: Unable to destroy:RGX.Contact_Details.autoCompleteForMendix1: Error while uninitialize TypeError: Cannot read property 'destroy' of undefined when closing a complex page with multiple autoCompleteForMendix widgets.  Any idea what the issue is and how to solve or at least troubleshoot?
1 answers

Seems like the widgets are still trying to destroy one or several objects that have already been destroyed.

Extracting the widget and opening the .js you will find only one use of .destroy on line 134:

if( this.showLabel ) {
else {
    dojoClass.remove(this.autoCompleteMainContainer, "form-group");

If you debug that part using the inspector, you might be able to solve it.

Of course, since this is debugging someone else's code, you can also try asking the creator. Do so by adding an issue to the github-project. He will appreciate it moer if you solve it yourself and add a pullrequest.