[Bug 22572] New: Garbled content of MARC control fields in MARC view
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22572 Bug ID: 22572 Summary: Garbled content of MARC control fields in MARC view Change sponsored?: --- Product: Koha Version: 18.11 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: mik@adminkuhn.ch QA Contact: testopia@bugs.koha-community.org Target Milestone: --- MARC control fields consist of a fix number of positions that can contain blanks. The "MARC view" in the Koha staff client and the Koha OPAC garbles the content of such fields when the field contains more than one consecutive blank - in this case more than one consecutive blank is automatically collapsed down by the webbrowser to just one. Additionally blanks may be trimmed at the end of the content of a field. For example MARC 008 does and must consist of exactly 40 positions, thus a line like the following (as shown via webbrowser in the MARC view) is always wrong: 800422s1978 sz a 1 ger In fact the correct content of MARC 008 would look like the following 800422s1978 sz a 1 ger Or better visible, when using # instead of blanks: 800422s1978####sz########a#####1###ger## Seemingly, this applies to all MARC control fields: 006 (fix length 18 positions), 007 (variable length of up to 23 positions), 008 (fix length of 40 positions). In the database the content of these fields is correct. Maybe before showing the blank character in the "MARC view" it should be coded as HTML entity so the webbrowser doesn't collapse it. Also it may be a good idea to show the beginning and the end of such fields because otherwise (like in the above example) it is not visible that the field does contain two positions with blanks at the end. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22572 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- I'm thinking we could do something like this in the template: [% subfiel.marc_value | replace(' ', ' ') | $raw %] ...which would convert spaces to for ALL output of MARC data, on the assumption that it doesn't hurt to do so with fields which don't rely on character position. I don't think there's a good way to change the style of the output of just those fields, since there's nothing in the framework which specifies that those tags are "positionally defined." -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22572 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 89364 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89364&action=edit Bug 22572: Display multiple spaces in MARC view -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22572 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|18.11 |master CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|NEW |In Discussion --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I think this patch is the way to go as it HTML filters *then* replace the space with , making sure the value will be correctly escaped. We certainly will need to apply this change to other places. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22572 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Should this be 'needs signoff'? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22572 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- No, the fix needs to be confirmed, then apply to other places (regarding my last comment). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22572 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |koha-bugs@lists.koha-commun | |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=22572 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Failed QA --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We don't know which fields this should apply to, but we know from the standard which 00x are position controlled. I believe this information is used in other places in our code too (slightly different for UNIMARC and MARC21). We could use this to only replace the spaces for the controlled fields to limit the range of this change. The will mean that the content can no longer 'break' on spaces for display, so limiting the effect to where needed would be good I think. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org