sf-cola / select_to_select2

This is a repository of select to select 2 which is a redmine plugin.
GNU General Public License v3.0
18 stars 22 forks source link

the products plug for redmine v4.1 raise a error #14

Open tomora opened 4 years ago

tomora commented 4 years ago

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.

sf-cola commented 4 years ago

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