[Bug 25293] New: Don't call escapeHtml on null
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293 Bug ID: 25293 Summary: Don't call escapeHtml on null Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: didier.gautheron@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com EscapeHtml is still called on many fields without testing if they exist: Uncaught TypeError: Cannot read property 'escapeHtml' of null Fields like title, branchcode and so on aren't guarantee to be not null. If they are, for whatever reason, broken items are often next to unfixable within Koha. -- 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=25293 didier <didier.gautheron@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |didier.gautheron@biblibre.c |ity.org |om -- 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=25293 --- Comment #1 from didier <didier.gautheron@biblibre.com> --- Created attachment 103862 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103862&action=edit Bug 25293: Don't call escapeHtml on null Test Plan: 1) Create two Checkouts 2) view patron's checkout list cgi-bin/koha/members/moremember.pl?borrowernumber=pp <show checkout> 3) in mysql shell delete a checkout home branch: update items set homebranch = null where itemnumber = xx; 4) view patron's checkout list, again Without this patch the list is empty. Same if biblio title is null (update biblio set title = null where biblionumber = yy;). Javascript error: TypeError: oObj.title is null -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293 didier <didier.gautheron@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #2 from Frédéric Demians <frederic@tamil.fr> --- How an item can have a 'homebranch' field empty or how can a biblio record have no title? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293 --- Comment #3 from didier <didier.gautheron@biblibre.com> --- (In reply to Frédéric Demians from comment #2)
How an item can have a 'homebranch' field empty or how can a biblio record have no title?
Hi, No idea, likely a bug somewhere, but they do. It seems that some imported MARC data can produce biblio records without title though. Anyway, both update items set homebranch = null where itemnumber = ...; and update biblio set title = null where biblionumber = ...; don't return an error, thus from the DB DDL POV they are valid, if they are not then something at the application level has to deal with it. checkouts.js is likely not the right place, only one with the fewer unexpected side effects. Regards Didier -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293 George Veranis <gveranis@dataly.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gveranis@dataly.gr --- Comment #4 from George Veranis <gveranis@dataly.gr> --- (In reply to Frédéric Demians from comment #2)
How an item can have a 'homebranch' field empty or how can a biblio record have no title?
A biblio can not have a title if you not entered in biblio framework , some cataloguers do that for some special records. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #5 from David Cook <dcook@prosentient.com.au> --- I usually encounter this issue because of the Keyword To MARC mapping removal, which caused some really bad Koha to MARC mappings in the biblio. It caused a lot of problems for us. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- *** Bug 25678 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=25293 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to David Cook from comment #5)
I usually encounter this issue because of the Keyword To MARC mapping removal, which caused some really bad Koha to MARC mappings in the biblio.
It caused a lot of problems for us.
So, sign it off? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293 --- Comment #8 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #7)
(In reply to David Cook from comment #5)
I usually encounter this issue because of the Keyword To MARC mapping removal, which caused some really bad Koha to MARC mappings in the biblio.
It caused a lot of problems for us.
So, sign it off?
That takes time and effort, and it isn't a local priority at the moment. It's on my TODO list, but it's a long list with other higher priorities. This issue almost always indicates a misconfiguration or bad data, so it's not really a critical issue. Since it's a non-critical issue, I could just sign it off, but I rather put the time in to test it fully. But that means it's not going to happen today. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch 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=25293 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #103862|0 |1 is obsolete| | --- Comment #9 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 106634 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106634&action=edit Bug 25293: Don't call escapeHtml on null Test Plan: 1) Create two Checkouts 2) view patron's checkout list cgi-bin/koha/members/moremember.pl?borrowernumber=pp <show checkout> 3) in mysql shell delete a checkout home branch: update items set homebranch = null where itemnumber = xx; 4) view patron's checkout list, again Without this patch the list is empty. Same if biblio title is null (update biblio set title = null where biblionumber = yy;). Javascript error: TypeError: oObj.title is null Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=25293 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106634|0 |1 is obsolete| | --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 106854 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106854&action=edit Bug 25293: Don't call escapeHtml on null Test Plan: 1) Create two Checkouts 2) view patron's checkout list cgi-bin/koha/members/moremember.pl?borrowernumber=pp <show checkout> 3) in mysql shell delete a checkout home branch: update items set homebranch = null where itemnumber = xx; 4) view patron's checkout list, again Without this patch the list is empty. Same if biblio title is null (update biblio set title = null where biblionumber = yy;). Javascript error: TypeError: oObj.title is null Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- There are also those two, but apparently they cannot be undefined 724 { 725 "mDataProp": function ( oObj ) { 726 return oObj.recordtype_description.escapeHtml(); 727 } 728 }, 729 { 730 "mDataProp": function ( oObj ) { 731 return oObj.itemtype_description.escapeHtml(); 732 } 733 }, -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |lucas@bywatersolutions.com Version(s)|20.11.00 |20.11.00, 20.05.03 released in| | --- Comment #13 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 20.05.x for 20.05.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|20.11.00, 20.05.03 |20.11.00, 20.05.03, released in| |19.11.09 CC| |aleisha@catalyst.net.nz --- Comment #14 from Aleisha Amohia <aleisha@catalyst.net.nz> --- backported to 19.11.x for 19.11.09 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net --- Comment #15 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (19.05.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=15219 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=27006 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- *** Bug 27006 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org