When a record has multiple instances of a field marked as 'important' and a cataloger removes one or more of the instances, and one is left in place, saving the record fails with: Uncaught TypeError: can't access property "getElementsByTagName", elem is null AreFieldsNotOk http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=0&z3950=1&frameworkcode=Default&breedingid=38:3841 Check http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=0&z3950=1&frameworkcode=Default&breedingid=38:3923 onOption http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=0&z3950=1&frameworkcode=Default&breedingid=38:782 <anonymous> http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=0&z3950=1&frameworkcode=Default&breedingid=38:698 jQuery 2 To recreate: 1 - In Admin - MARC bibliographic frameworks edit the default framewwork and edit 650 tag and mark it as important 2 - Go to cataloging -> new from z39.50 3 - Find a record with mulltiple 650 fields 4 - Delete one of the fields 5 - Attempt to save the record - nothing happens 6 - Check the console log in the browser, see the error noted above
Created attachment 187766 [details] [review] Bug 40997: Don't check elements that have been removed
Created attachment 187767 [details] [review] Bug 40997: Remove uneccessary whitespace
Created attachment 187927 [details] [review] Bug 40997: Don't check elements that have been removed Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Created attachment 187928 [details] [review] Bug 40997: Remove uneccessary whitespace Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
When I first tried testing this I was unable to import a record from z39.50 because of bug 40272. This patch works as described. It may be obvious to library folks, but wasn't to me right away, how to easily find a record with multiple 650s you can do the z39.50 search for author 'patterson, james'
Created attachment 188056 [details] [review] Bug 40997: Remove uneccessary whitespace Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Nice work everyone! Pushed to main for 25.11
Nice work everyone! Pushed to 25.05.x
Pushed to 24.11.x for 24.11.11