Home › Forums › Bug Reports › Select2 in repeater broken after update to 5.5.13 › Reply To: Select2 in repeater broken after update to 5.5.13
this error
select2(‘destroy’) method was called on an element that is not using Select2
can track to acf-input.js file and there
at line 10337 is
if( !this.$select.exists() || !this.o.ui) {...
according to this stackoverflow simplest way is to check if this element is select2 object.
http://stackoverflow.com/questions/38797207/how-to-handle-the-select2destroy-method-was-called-on-an-element-that-is-n
so changing this line to
if( !this.$select.exists() || !this.o.ui) || !this.$select.data('select2') {...
fix problem for me
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.