Summary: | When choose an author in authority results new window shows a blank screen | ||
---|---|---|---|
Product: | Koha | Reporter: | George Veranis <gveranis> |
Component: | Cataloging | Assignee: | Oleg Vasylenko <synapse.ova> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | jonathan.druart, joseanjos, kyle, m.de.rooy, marjorie.barry-vila, mtj, synapse.ova |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | 13501, 18119 | ||
Bug Blocks: | 22242 | ||
Attachments: |
authority results choose
Bug 17780: JS structure check fix [SIGNED-OFF] Bug 17780 - When choose an author in authority results new window shows a blank screen Bug 17780 - When choose an author in authority results new window shows a blank screen Bug 17780: Add a comment to explain the line |
It is expected that a new blank window pops up, but it is supposed to then close itself. I would expect that a JavaScript error is causing the window not to close. This works for me in master and 16.05.x, so I wonder if you have some custom JavaScript in intranetuserjs which might be causing a problem? No the installation is clean and is on 16.11 . on console log I have the following Uncaught TypeError: Cannot read property 'match' of null(…) cataloging.js:106 the problem is that on line 106 is trying to match with id and select2 not produce select with id , and I add this on select2.min.js in order select has id attribute and not fail "<div class='select2-drop select2-display-none' id='select2-display-none-"+Math.floor(Date.now() /1000)+"'>"," <div class='select2-searc h' id='select-search-"+Math.floor(Date.now() / 1000)+"'>", but then I have another problem with select2 which not bind on click for cloned field there I tried a lot to solve it but without success at yet. If I'm correct 16.05 not use select2 and yes works perfect ! The same is happening with me. Blank window needs to be manually closed. Koha version: 16.11 + mariaDB + Ubuntu 16.04 Created attachment 59513 [details] [review] Bug 17780: JS structure check fix Select2 (Bug 13501) introduced divs and inputs that broke some assumptions about the expected HTML structure. This patch checks if input has name attribute, because some inputs in Select2 have not. Blank screen happens on page blinddetail-biblio-search.pl because when the script works with field that has Select2 as one of the subfields, it finds some structures, that have no required attributes. To test: Try to add info from the authorities to field that has subfield with Select2 (subfield with authorised values on Koha 16.11+). For example, in UNIMARC installations that should be 700, 701, 702 Steps to Reproduce: 1. Open some book in the editor or create new (cataloguing/addbiblio.pl) 2. Add info to authority-controlled subfield. One of the subfields of this field should be thesaurus driven → subfield with Select2 (In UNIMARC that could be 700-702) Actual Results: — data from the authority record does not added — blinddetail-biblio-search.pl with white screen is opened, and does not close Expected Results: Info from the authority record shoul be added to appropriate subfields Additional Information: This happens because Select2 adds some inputs, that do not have NAME property. The following patch adds check for the needed attribute existance. Created attachment 60238 [details] [review] [SIGNED-OFF] Bug 17780 - When choose an author in authority results new window shows a blank screen Select2 (Bug 13501) introduced divs and inputs that broke some assumptions about the expected HTML structure. This patch checks if input has name attribute, because some inputs in Select2 have not. To test: Try to add info from the authorities to field that has subfield with Select2 (subfield with authorised values on Koha 16.11+) Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 60241 [details] [review] Bug 17780 - When choose an author in authority results new window shows a blank screen Select2 (Bug 13501) introduced divs and inputs that broke some assumptions about the expected HTML structure. This patch checks if input has name attribute, because some inputs in Select2 have not. To test: Try to add info from the authorities to field that has subfield with Select2 (subfield with authorised values on Koha 16.11+) Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Created attachment 60242 [details] [review] Bug 17780: Add a comment to explain the line Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> To recreate the issue the select2 should be placed before $9! Pushed to master for 17.05, thanks Oleg, Jonathan! These patches have been pushed to 16.11.x and will be in 16.11.04. Pushed to 16.05.x, for 16.05.10 release |
Created attachment 58199 [details] authority results choose When a librarian open the authority window to search , find one or more results and try to choose a result then a new window is open and show a blank screen and stop. If we return to our cataloguing form then the authority has passed but the blank screen is remain.