select2.js?1560995188:848 Uncaught Error: Option 'ajax' is not allowed for Select2 when attached to a <select> element. at String.<anonymous> (select2.js?1560995188:848) at Function.each (jquery-1.11.1-ui-1.11.0-ujs-4.3.1.js?1560171196:2) at constructor.prepareOpts (select2.js?1560995188:846) at constructor.prepareOpts (select2.js?1560995188:2390) at constructor.init (select2.js?1560995188:660) at HTMLSelectElement.<anonymous> (select2.js?1560995188:3147) at Function.each (jquery-1.11.1-ui-1.11.0-ujs-4.3.1.js?1560171196:2) at m.fn.init.each (jquery-1.11.1-ui-1.11.0-ujs-4.3.1.js?1560171196:2) at m.fn.init.$.fn.select2 (select2.js?1560995188:3134) at HTMLDocument.<anonymous> (select2_helpers.js?1560994378:121)
when run to the following code(URL is projects/test/products/new):
if (select) { // these options are not allowed when attached to a select because they are picked up off the element itself $.each(["id", "multiple", "ajax", "query", "createSearchChoice", "initSelection", "data", "tags"], function () { if (this in opts) { throw new Error("Option '" + this + "' is not allowed for Select2 when attached to a <select> element."); } }); }
Can you help me? It's a my mistake on the configure of remine or a bug of this plug?
Probably https://github.com/select2/select2/issues/679
I thought it was the same as this issue.
It may be a little more detailed if you can tell me from which screen of Redmine it is operated.
@tomora
select2.js?1560995188:848 Uncaught Error: Option 'ajax' is not allowed for Select2 when attached to a <select> element. at String.<anonymous> (select2.js?1560995188:848) at Function.each (jquery-1.11.1-ui-1.11.0-ujs-4.3.1.js?1560171196:2) at constructor.prepareOpts (select2.js?1560995188:846) at constructor.prepareOpts (select2.js?1560995188:2390) at constructor.init (select2.js?1560995188:660) at HTMLSelectElement.<anonymous> (select2.js?1560995188:3147) at Function.each (jquery-1.11.1-ui-1.11.0-ujs-4.3.1.js?1560171196:2) at m.fn.init.each (jquery-1.11.1-ui-1.11.0-ujs-4.3.1.js?1560171196:2) at m.fn.init.$.fn.select2 (select2.js?1560995188:3134) at HTMLDocument.<anonymous> (select2_helpers.js?1560994378:121)
when run to the following code(URL is projects/test/products/new):
if (select) { // these options are not allowed when attached to a select because they are picked up off the element itself $.each(["id", "multiple", "ajax", "query", "createSearchChoice", "initSelection", "data", "tags"], function () { if (this in opts) { throw new Error("Option '" + this + "' is not allowed for Select2 when attached to a <select> element."); } }); }
Can you help me? It's a my mistake on the configure of remine or a bug of this plug?
Thank you.