Overview: Repeat tag fails if authority field has select subfield (for example, UNIMARC 700$8, 800$a) Steps to Reproduce: In authority editor repeat field that has select subfield Actual Results: Field does not repeat (copy is not created). Console shows a js TypeError in cataloging.js: «$(...).select2 is not a function» Expected Results: Field will repeat (copy is created) Additional Information: Error happens in version 16.11+ after adding Select2 js functions. The easiest way to fix is to add Select2 to authority editor
Created attachment 62070 [details] [review] Bug 18422 - Add Select2 to authority editor This patch add Select2 to authority editor
This is no enhancement but a real bug with a dirty JS error.
Created attachment 67142 [details] [review] Bug 18422 - Add Select2 to authority editor Overview: Repeat tag fails if authority field has select subfield (for example, UNIMARC 700$8, 800$a) This patch adds Select2 to authority editor Steps to Reproduce: In authority editor repeat field that has select subfield Actual Results: Field does not repeat (copy is not created). Console shows a js TypeError in cataloging.js: «$(...).select2 is not a function» Expected Results: Field will repeat (copy is created) Additional Information: Error happens in version 16.11+ after adding Select2 js functions. The easiest way to fix is to add Select2 to authority editor Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Works fine. Also tested that auto-completion works in the select in authority edition.
Created attachment 67451 [details] [review] Bug 18422 - Add Select2 to authority editor Overview: Repeat tag fails if authority field has select subfield (for example, UNIMARC 700$8, 800$a) This patch adds Select2 to authority editor Steps to Reproduce: In authority editor repeat field that has select subfield Actual Results: Field does not repeat (copy is not created). Console shows a js TypeError in cataloging.js: «$(...).select2 is not a function» Expected Results: Field will repeat (copy is created) Additional Information: Error happens in version 16.11+ after adding Select2 js functions. The easiest way to fix is to add Select2 to authority editor Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Created attachment 67452 [details] [review] Bug 18422: (QA follow-up) Check if select2 is available before using it cataloging.js might not always be loaded with select2.js, so we should check its availability to prevent JS errors Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Pushed to master for 17.11, thanks to everybody involved!
Pushed to 17.05.x, will be in 17.05.06.
These patches have been pushed to 16.11.x and will be in 16.11.14.