Title: Javascript Error regarding Select2
Last modified: May 24, 2023

---

# Javascript Error regarding Select2

 *  Resolved [bibberle](https://wordpress.org/support/users/bibberle/)
 * (@bibberle)
 * [3 years ago](https://wordpress.org/support/topic/javascript-error-regarding-select2/)
 * Hello,
 * unfortunally, my site throws an javascript error when viewing logs, so I cannot
   filter these. The error is:
 * `caught Error: No select2/compat/initSelection
   at D (select2.js?ver=4.0.13:2:
   1364)at s (select2.js?ver=4.0.13:2:2743)at select2.js?ver=4.0.13:2:1202at n.apply(
   select2.js?ver=4.0.13:2:53444)at new e (select2.js?ver=4.0.13:2:57220)at new 
   d (select2.js?ver=4.0.13:2:59399)at HTMLSelectElement. (select2.js?ver=4.0.13:
   2:68932)at Function.each (load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,
   jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&
   ver=6.2:2:3003)at e..each (load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,
   jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&
   ver=6.2:2:1481)at i.fn.select2 (select2.js?ver=4.0.13:2:68892)D

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Pär Thernström](https://wordpress.org/support/users/eskapism/)
 * (@eskapism)
 * [3 years ago](https://wordpress.org/support/topic/javascript-error-regarding-select2/#post-16763372)
 * Probably some incompability issue with another plugins. Any chance you could 
   list the plugins you have active?
 *  Thread Starter [bibberle](https://wordpress.org/support/users/bibberle/)
 * (@bibberle)
 * [3 years ago](https://wordpress.org/support/topic/javascript-error-regarding-select2/#post-16763706)
 * Solved the issue by enqueuing select2 with another slug like “select2v4”
 *  Plugin Author [Pär Thernström](https://wordpress.org/support/users/eskapism/)
 * (@eskapism)
 * [3 years ago](https://wordpress.org/support/topic/javascript-error-regarding-select2/#post-16779927)
 * Thanks for posting the solution! I will “namespace” select2 or use another library
   in the future to avoid issues like this.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Javascript Error regarding Select2’ is closed to new replies.

 * ![](https://ps.w.org/simple-history/assets/icon.svg?rev=3225008)
 * [Simple History – Track, Log, and Audit WordPress Changes](https://wordpress.org/plugins/simple-history/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-history/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-history/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-history/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-history/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-history/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Pär Thernström](https://wordpress.org/support/users/eskapism/)
 * Last activity: [3 years ago](https://wordpress.org/support/topic/javascript-error-regarding-select2/#post-16779927)
 * Status: resolved