[Bug 30009] New: Records with invalid MarcXML show notes tab 'Descriptions(1)' but tab is empty
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30009 Bug ID: 30009 Summary: Records with invalid MarcXML show notes tab 'Descriptions(1)' but tab is empty Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org See bug 29690 - find/create a record with invalid marc Notes tab shows but is empty -- 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=30009 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |29690 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29690 [Bug 29690] Software error in details.pl when invalid MARCXML -- 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=30009 Bug 30009 depends on bug 29690, which changed state. Bug 29690 Summary: Software error in details.pl when invalid MARCXML https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29690 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED Resolution|--- |FIXED -- 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=30009 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com Severity|normal |minor --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- That's expected, there is a warning "the view may be degraded". This is not a bug IMO. -- 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=30009 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=30009 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 131917 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131917&action=edit Bug 30009: If no record set MARCNOTES undef, rather than empty array Currently we pass an empty array if there is no marc record - this is read as 'true' by template toolkit, and the desciptions tab is loaded This patch just sets the variable as undef which is false To test: 1 - Find or create an invalid marc record 2 - View in staff client 3 - Note tab Descriptions(1) has no content 4 - Apply patch, reload 5 - No empty tab -- 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=30009 --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #1)
That's expected, there is a warning "the view may be degraded". This is not a bug IMO.
Sure, but problem is what we are passing, we should instead pass nothing -- 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=30009 --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- How does one create an invalid MARC record? -- 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=30009 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Owen Leonard from comment #4)
How does one create an invalid MARC record?
Record 369 in KTD's database has an invalid MARC::Record. Otherwise you can edit a biblio reuse step 3 from Nick's test plan from bug 30008: 3 - In the 520 notes field, add an ASCII escape character (27 decimal, 1b hex) On ubuntu Ctrl+Shift+u, then 1b, enter The character for copy/paste is: -- 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=30009 --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Jonathan Druart from comment #5)
The character for copy/paste is:
It got removed. -- 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=30009 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=30009 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #131917|0 |1 is obsolete| | --- Comment #7 from David Nind <david@davidnind.com> --- Created attachment 135008 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135008&action=edit Bug 30009: If no record set MARCNOTES undef, rather than empty array Currently we pass an empty array if there is no marc record - this is read as 'true' by template toolkit, and the desciptions tab is loaded This patch just sets the variable as undef which is false To test: 1 - Find or create an invalid marc record 2 - View in staff client 3 - Note tab Descriptions(1) has no content 4 - Apply patch, reload 5 - No empty tab Signed-off-by: David Nind <david@davidnind.com> -- 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=30009 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #8 from David Nind <david@davidnind.com> --- I've signed off as things work as per the test plan when using KTD and record 369 in the test data. Note that the 520 filed for record 369 has a valid value, and that it is other missing tags making it invalid (as far as I can see). It displays correctly once the patch is applied. Also, if you try to view the record in the OPAC you get an error trace: Invalid data, cannot decode metadata object (biblio_metadata.id=368, biblionumber=369, format=marcxml, schema=MARC21, decoding_error=':8: parser error : PCDATA invalid Char value 31 <controlfield tag="001">00aD000015937</controlfield> ^ :9: parser error : PCDATA invalid Char value 31 <controlfield tag="004">00satmrnu0</controlfield> ^ :9: parser error : PCDATA invalid Char value 31 <controlfield tag="004">00satmrnu0</controlfield> ^ :9: parser error : PCDATA invalid Char value 31 <controlfield tag="004">00satmrnu0</controlfield> ^ :9: parser error : PCDATA invalid Char value 31 <controlfield tag="004">00satmrnu0</controlfield> ^ :10: parser error : PCDATA invalid Char value 31 <controlfield tag="008">00ar19881981bdkldan</controlfield> ^ :10: parser error : PCDATA invalid Char value 31 <controlfield tag="008">00ar19881981bdkldan</controlfield> ^ :10: parser error : PCDATA invalid Char value 31 <controlfield tag="008">00ar19881981bdkldan</controlfield> ^') at /usr/share/perl5/Exception/Class/Base.pm line 88 in Exception::Class::Base::throw at /usr/share/perl5/Exception/Class/Base.pm line 88 -- 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=30009 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- 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=30009 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- No assignee? -- 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=30009 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- 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=30009 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Nick Clemens from comment #2)
Currently we pass an empty array if there is no marc record - this is read as 'true' by template toolkit, and the desciptions tab is loaded
This patch just sets the variable as undef which is false
Just being more precise: We pass an empty list. This is not read as true, as the above commit message tells. But it creates the odd arguments hash where the next key shifts into the position of the MARCNOTES value. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30009 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=30009 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 135101 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135101&action=edit Bug 30009: Do not set MARCNOTES to empty list in list context AMENDED: We should not pass an empty list here, but just undef in order to prevent creating a shift of elements in the hash. To test: 1 - Find or create an invalid marc record 2 - View in staff client 3 - Note tab Descriptions(1) has no content 4 - Apply patch, reload 5 - No empty tab Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30009 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | Keywords| |rel_22_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30009 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135008|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=30009 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30009 --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, 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=30009 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_22_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org