[Bug 42424] New: Javascript error prevents saving when an instance of an 'important' or 'required' subfield is deleted
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42424 Bug ID: 42424 Summary: Javascript error prevents saving when an instance of an 'important' or 'required' subfield is deleted Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Like bug 40997 - but when marking subfields important -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42424 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42424 --- Comment #1 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 197866 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197866&action=edit Bug 42424: Javascript error prevents saving when an instance of an 'important' or 'required' subfield is deleted In the loop to check fields, we enter a conditional when the element is null - but then we try to adjust the element. This patch removes the condition and prevents accessing NULL fields To test: 1 - Go to Administration->MARC Bibliographic framework 2 - Under Default click Action->MARC Structure 3 - Search for 020 4 - Click Actions->Edit subfields 5 - Click on tab 'a' 6 - Check important, save 7 - Cataloging->New from Z39 8 - Search for ISBN: 9798225048921 (or any record you want) 9 - Ensure the result has more than one ISBN and click Actions->Import 10 - Delete one of the ISBN fields 11 - Click 'Save' 12 - Check the console (F12) Uncaught TypeError: Cannot read properties of null (reading 'nodeName') 13 - Apply patch 14 - Repeat 8-10 15 - Click save (and clear any other fields that need edited) 16 - Confirm record can be saved -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42424 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hammat.wele@inlibro.com --- Comment #2 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- *** Bug 41844 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42424 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=40997 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42424 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42424 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #197866|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42424 --- Comment #3 from Phil Ringnalda <phil@chetcolibrary.org> --- Created attachment 198163 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198163&action=edit Bug 42424: Javascript error prevents saving when an instance of an 'important' or 'required' subfield is deleted In the loop to check fields, we enter a conditional when the element is null - but then we try to adjust the element. This patch removes the condition and prevents accessing NULL fields To test: 1 - Go to Administration->MARC Bibliographic framework 2 - Under Default click Action->MARC Structure 3 - Search for 020 4 - Click Actions->Edit subfields 5 - Click on tab 'a' 6 - Check important, save 7 - Cataloging->New from Z39 8 - Search for ISBN: 9798225048921 (or any record you want) 9 - Ensure the result has more than one ISBN and click Actions->Import 10 - Delete one of the ISBN fields 11 - Click 'Save' 12 - Check the console (F12) Uncaught TypeError: Cannot read properties of null (reading 'nodeName') 13 - Apply patch 14 - Repeat 8-10 15 - Click save (and clear any other fields that need edited) 16 - Confirm record can be saved Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42424 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |phil@chetcolibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42424 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@openfifth.c |y.org |o.uk Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42424 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198163|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42424 --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198456 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198456&action=edit Bug 42424: Javascript error prevents saving when an instance of an 'important' or 'required' subfield is deleted In the loop to check fields, we enter a conditional when the element is null - but then we try to adjust the element. This patch removes the condition and prevents accessing NULL fields To test: 1 - Go to Administration->MARC Bibliographic framework 2 - Under Default click Action->MARC Structure 3 - Search for 020 4 - Click Actions->Edit subfields 5 - Click on tab 'a' 6 - Check important, save 7 - Cataloging->New from Z39 8 - Search for ISBN: 9798225048921 (or any record you want) 9 - Ensure the result has more than one ISBN and click Actions->Import 10 - Delete one of the ISBN fields 11 - Click 'Save' 12 - Check the console (F12) Uncaught TypeError: Cannot read properties of null (reading 'nodeName') 13 - Apply patch 14 - Repeat 8-10 15 - Click save (and clear any other fields that need edited) 16 - Confirm record can be saved Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42424 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42424 --- Comment #5 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42424 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00 |26.05.00,25.11.05 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42424 --- Comment #6 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org