{"id":1565916,"date":"2018-07-02T08:05:04","date_gmt":"2018-07-02T15:05:04","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-error-on-admin-pages\/"},"modified":"2018-07-02T08:05:04","modified_gmt":"2018-07-02T15:05:04","slug":"select2-error-on-admin-pages","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-error-on-admin-pages\/","title":{"rendered":"Select2 error on admin pages"},"content":{"rendered":"<p>Hi<\/p>\n<p>On visiting the page for adding a new WooCommerce product &#8211; \/wp-admin\/post-new.php?post_type=product &#8211; the following JavaScript error appears in the console:<\/p>\n<pre><code>Uncaught Error: Option &#039;ajax&#039; is not allowed for Select2 when attached to a &lt;select&gt; element.\n    at String.&lt;anonymous&gt; (select2.min.js?ver=4.7.15:21)\n    at Function.each (load-scripts.php?c=1&amp;load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,underscor&amp;load[]=e,backbone,wp-util,wp-backbone,media-models,moxiejs,plupload&amp;ver=4.9.6:2)\n    at i.prepareOpts (select2.min.js?ver=4.7.15:21)\n    at i.prepareOpts (select2.min.js?ver=4.7.15:22)\n    at init (select2.min.js?ver=4.7.15:21)\n    at HTMLSelectElement.&lt;anonymous&gt; (select2.min.js?ver=4.7.15:22)\n    at Function.each (load-scripts.php?c=1&amp;load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,underscor&amp;load[]=e,backbone,wp-util,wp-backbone,media-models,moxiejs,plupload&amp;ver=4.9.6:2)\n    at a.fn.init.each (load-scripts.php?c=1&amp;load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,underscor&amp;load[]=e,backbone,wp-util,wp-backbone,media-models,moxiejs,plupload&amp;ver=4.9.6:2)\n    at a.fn.init.e.fn.select2 (select2.min.js?ver=4.7.15:22)\n    at Object.d.initializeEnhancedSelect (wc-memberships-enhanced-select.min.js?ver=1.10.4:1)\n(anonymous) @ select2.min.js?ver=4.7.15:21\neach @ load-scripts.php?c=1&amp;load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,underscor&amp;load[]=e,backbone,wp-util,wp-backbone,media-models,moxiejs,plupload&amp;ver=4.9.6:2\nprepareOpts @ select2.min.js?ver=4.7.15:21\nprepareOpts @ select2.min.js?ver=4.7.15:22\ninit @ select2.min.js?ver=4.7.15:21\n(anonymous) @ select2.min.js?ver=4.7.15:22\neach @ load-scripts.php?c=1&amp;load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,underscor&amp;load[]=e,backbone,wp-util,wp-backbone,media-models,moxiejs,plupload&amp;ver=4.9.6:2\neach @ load-scripts.php?c=1&amp;load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,underscor&amp;load[]=e,backbone,wp-util,wp-backbone,media-models,moxiejs,plupload&amp;ver=4.9.6:2\ne.fn.select2 @ select2.min.js?ver=4.7.15:22\nd.initializeEnhancedSelect @ wc-memberships-enhanced-select.min.js?ver=1.10.4:1\n(anonymous) @ wc-memberships-admin.min.js?ver=1.10.4:1\ni @ load-scripts.php?c=1&amp;load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,underscor&amp;load[]=e,backbone,wp-util,wp-backbone,media-models,moxiejs,plupload&amp;ver=4.9.6:2\nfireWith @ load-scripts.php?c=1&amp;load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,underscor&amp;load[]=e,backbone,wp-util,wp-backbone,media-models,moxiejs,plupload&amp;ver=4.9.6:2\nready @ load-scripts.php?c=1&amp;load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,underscor&amp;load[]=e,backbone,wp-util,wp-backbone,media-models,moxiejs,plupload&amp;ver=4.9.6:2\nK @ load-scripts.php?c=1&amp;load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,underscor&amp;load[]=e,backbone,wp-util,wp-backbone,media-models,moxiejs,plupload&amp;ver=4.9.6:2<\/code><\/pre>\n<p>I have the following plugins enabled:<\/p>\n<p>WooCommerce 3.4.3<br \/>\nWooCommerce Memberships 1.10.4<br \/>\nThe Events Calendar PRO 4.4.28<\/p>\n<p>========================<br \/>\nPLEASE LEAVE FOR SUPPORT<br \/>\nReporting the same issue as:\u00a0https:\/\/theeventscalendar.com\/support\/forums\/topic\/the-events-calendar-select2-conflict-with-woocommerce-membership-plugin\/<\/p>\n","protected":false},"template":"","class_list":["post-1565916","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Select2 error on admin pages -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-error-on-admin-pages\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Select2 error on admin pages -\" \/>\n<meta property=\"og:description\" content=\"Hi On visiting the page for adding a new WooCommerce product &#8211; \/wp-admin\/post-new.php?post_type=product &#8211; the following JavaScript error appears in the console: Uncaught Error: Option &#039;ajax&#039; is not allowed for Select2 when attached to a &lt;select&gt; element. at String.&lt;anonymous&gt; (select2.min.js?ver=4.7.15:21) at Function.each (load-scripts.php?c=1&amp;load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,underscor&amp;load[]=e,backbone,wp-util,wp-backbone,media-models,moxiejs,plupload&amp;ver=4.9.6:2) at i.prepareOpts (select2.min.js?ver=4.7.15:21) at i.prepareOpts (select2.min.js?ver=4.7.15:22) at init (select2.min.js?ver=4.7.15:21) at HTMLSelectElement.&lt;anonymous&gt; (select2.min.js?ver=4.7.15:22) [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-error-on-admin-pages\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-error-on-admin-pages\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-error-on-admin-pages\/\",\"name\":\"Select2 error on admin pages -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2018-07-02T15:05:04+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-error-on-admin-pages\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-error-on-admin-pages\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-error-on-admin-pages\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Select2 error on admin pages\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Select2 error on admin pages -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-error-on-admin-pages\/","og_locale":"en_US","og_type":"article","og_title":"Select2 error on admin pages -","og_description":"Hi On visiting the page for adding a new WooCommerce product &#8211; \/wp-admin\/post-new.php?post_type=product &#8211; the following JavaScript error appears in the console: Uncaught Error: Option &#039;ajax&#039; is not allowed for Select2 when attached to a &lt;select&gt; element. at String.&lt;anonymous&gt; (select2.min.js?ver=4.7.15:21) at Function.each (load-scripts.php?c=1&amp;load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,underscor&amp;load[]=e,backbone,wp-util,wp-backbone,media-models,moxiejs,plupload&amp;ver=4.9.6:2) at i.prepareOpts (select2.min.js?ver=4.7.15:21) at i.prepareOpts (select2.min.js?ver=4.7.15:22) at init (select2.min.js?ver=4.7.15:21) at HTMLSelectElement.&lt;anonymous&gt; (select2.min.js?ver=4.7.15:22) [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-error-on-admin-pages\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-error-on-admin-pages\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-error-on-admin-pages\/","name":"Select2 error on admin pages -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2018-07-02T15:05:04+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-error-on-admin-pages\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-error-on-admin-pages\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-error-on-admin-pages\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Select2 error on admin pages"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1565916","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1565916\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1565916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}