{"id":1384441,"date":"2017-11-16T04:55:02","date_gmt":"2017-11-16T12:55:02","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-js-error-with-city-multi-select-filter\/"},"modified":"2017-11-16T04:57:11","modified_gmt":"2017-11-16T12:57:11","slug":"select2-js-error-with-city-multi-select-filter","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-js-error-with-city-multi-select-filter\/","title":{"rendered":"Select2 JS error with city multi-select filter"},"content":{"rendered":"<p><strong>Summary<\/strong><br \/>\n&#8211; Using &#8216;Event Category&#8217; and &#8216;City&#8217; fields in Filter Bar<br \/>\n&#8211; When using &#8216;multi-select&#8217; and &#8216;dropdown&#8217;, respectively, everything works ok<br \/>\n&#8211; When setting the City field to be &#8216;multi-select&#8217;, however, a JavaScript error is triggered<br \/>\n&#8211; City list still loads when typing first character although no AJAX request is sent<\/p>\n<p>Hi. We have an issue using the &#8216;multi-select&#8217; option with the City filter in the Filter Bar plugin. As detailed above, everything works fine with the standard &#8216;dropdown&#8217; field but when we switch the City to be &#8216;multi-select&#8217;, we get a Select2 JavaScript error (see screenshot).<\/p>\n<p>When clicking on the text box to enter a city, the spinner appears and the JavaScript error fires. Interestingly, the city search still works if you then continue to type a character and select a city. You can click a city and it will be added to the list although no AJAX request is sent and no filtering occurs on the front-end.<\/p>\n<p>As an additional note; we have over 1,000 events in the system (most with venues) but when I navigate to Events &gt; Venues, there are none listed even though the count can clearly be seen (see screenshot).<\/p>\n<p>Thanks for your help.<\/p>\n","protected":false},"template":"","class_list":["post-1384441","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 JS error with city multi-select filter -<\/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-js-error-with-city-multi-select-filter\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Select2 JS error with city multi-select filter -\" \/>\n<meta property=\"og:description\" content=\"Summary &#8211; Using &#8216;Event Category&#8217; and &#8216;City&#8217; fields in Filter Bar &#8211; When using &#8216;multi-select&#8217; and &#8216;dropdown&#8217;, respectively, everything works ok &#8211; When setting the City field to be &#8216;multi-select&#8217;, however, a JavaScript error is triggered &#8211; City list still loads when typing first character although no AJAX request is sent Hi. We have an [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-js-error-with-city-multi-select-filter\/\" \/>\n<meta property=\"article:modified_time\" content=\"2017-11-16T12:57:11+00:00\" \/>\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=\"1 minute\" \/>\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-js-error-with-city-multi-select-filter\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-js-error-with-city-multi-select-filter\/\",\"name\":\"Select2 JS error with city multi-select filter -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-11-16T12:55:02+00:00\",\"dateModified\":\"2017-11-16T12:57:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-js-error-with-city-multi-select-filter\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-js-error-with-city-multi-select-filter\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-js-error-with-city-multi-select-filter\/#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\":\"Filter Bar\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/filter-bar\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Select2 JS error with city multi-select filter\"}]},{\"@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 JS error with city multi-select filter -","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-js-error-with-city-multi-select-filter\/","og_locale":"en_US","og_type":"article","og_title":"Select2 JS error with city multi-select filter -","og_description":"Summary &#8211; Using &#8216;Event Category&#8217; and &#8216;City&#8217; fields in Filter Bar &#8211; When using &#8216;multi-select&#8217; and &#8216;dropdown&#8217;, respectively, everything works ok &#8211; When setting the City field to be &#8216;multi-select&#8217;, however, a JavaScript error is triggered &#8211; City list still loads when typing first character although no AJAX request is sent Hi. We have an [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-js-error-with-city-multi-select-filter\/","article_modified_time":"2017-11-16T12:57:11+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-js-error-with-city-multi-select-filter\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-js-error-with-city-multi-select-filter\/","name":"Select2 JS error with city multi-select filter -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-11-16T12:55:02+00:00","dateModified":"2017-11-16T12:57:11+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-js-error-with-city-multi-select-filter\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-js-error-with-city-multi-select-filter\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/select2-js-error-with-city-multi-select-filter\/#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":"Filter Bar","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/filter-bar\/"},{"@type":"ListItem","position":5,"name":"Select2 JS error with city multi-select filter"}]},{"@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\/1384441","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":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1384441\/revisions"}],"predecessor-version":[{"id":1384444,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1384441\/revisions\/1384444"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1384441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}