[Bug 29556] New: MARC21slim2MODS.xsl broken by duplicate template name "part"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29556 Bug ID: 29556 Summary: MARC21slim2MODS.xsl broken by duplicate template name "part" Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org Depends on: 5927 Bug 5927, "Show series information in search results page" made a change to MARC21slimUtils.xsl, adding a block starting like this: <xsl:template name="part"> ...this breaks UNAPI in the OPAC when using MODS format because MARC21slim2MODS.xsl, which imports MARC21slimUtils.xsl, also includes the same block. Removing the redundant section from MARC21slim2MODS.xsl should fix the error. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5927 [Bug 5927] Show series information in search results page -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29556 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29556 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 127933 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127933&action=edit Bug 29556: MARC21slim2MODS.xsl broken by duplicate template name "part" This patch removes a redundant section from MARC21slim2MODS.xsl which was breaking the option to use unAPI in the OPAC using MODS format. To test, apply the patch and view a record in the OPAC using unAPI, e.g.: /cgi-bin/koha/unapi?id=koha:biblionumber:1&format=MODS You should see an XML file where previously there would have been an error. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29556 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29556 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127933|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 128014 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128014&action=edit Bug 29556: MARC21slim2MODS.xsl broken by duplicate template name "part" This patch removes a redundant section from MARC21slim2MODS.xsl which was breaking the option to use unAPI in the OPAC using MODS format. To test, apply the patch and view a record in the OPAC using unAPI, e.g.: /cgi-bin/koha/unapi?id=koha:biblionumber:1&format=MODS You should see an XML file where previously there would have been an error. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29556 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Text to go in the| |This fixes an error when release notes| |making an unAPI request in | |the OPAC using the MODS | |format. A 500 page error | |was displayed instead of an | |XML file. Example URL: | |http://your-library-opac-do | |main/cgi-bin/koha/unapi?id= | |koha:biblionumber:1&format= | |MODS -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29556 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Resolves: [2021/11/26 08:51:19] [WARN] XSLT::Base: compilation error: file /usr/share/koha/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS.xsl element template xsl:template: error duplicate name 'part' at /usr/share/koha/Koha/XSLT/Base.pm line 342. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29556 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=29556 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128014|0 |1 is obsolete| | --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 128028 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128028&action=edit Bug 29556: MARC21slim2MODS.xsl broken by duplicate template name "part" This patch removes a redundant section from MARC21slim2MODS.xsl which was breaking the option to use unAPI in the OPAC using MODS format. To test, apply the patch and view a record in the OPAC using unAPI, e.g.: /cgi-bin/koha/unapi?id=koha:biblionumber:1&format=MODS You should see an XML file where previously there would have been an error. 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=29556 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 | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29556 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- What about: git grep 'xsl:template name="part"' [11:13:29] koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MADS.xsl: <xsl:template name="part"> koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS3-1.xsl: <xsl:template name="part"> koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS3.xsl: <xsl:template name="part"> koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS32.xsl: <xsl:template name="part"> koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl: <xsl:template name="part"> koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl: <xsl:template name="part"> koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl: <xsl:template name="part"> koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl: <xsl:template name="part"> % grep slimUtils koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MADS.xsl koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS3-1.xsl koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS3.xsl koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS32.xsl koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MADS.xsl: <xsl:include href="http://www.loc.gov/marcxml/xslt/MARC21slimUtils.xsl"/> koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS3-1.xsl: <xsl:include href="MARC21slimUtils-MODS31.xsl"/> koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS3.xsl: <xsl:include href="MARC21slimUtils.xsl"/> koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS32.xsl: <xsl:include href="MARC21slimUtils.xsl"/> koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl:<xsl:import href="UNIMARCslimUtils.xsl"/> koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl:<xsl:import href="UNIMARCslimUtils.xsl"/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29556 --- Comment #6 from Owen Leonard <oleonard@myacpl.org> ---
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MADS.xsl
This seems to be an authority record export format which can be tested by viewing an authority in the staff interface and choosing Save -> MADS. The export appears to work correctly.
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS3-1.xsl
This seems to be a bibliographic record export format which can be tested by viewing a bibliographic record in the staff interface and choosing Save -> MODS. The export appears to work correctly.
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS3.xsl koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS32.xsl
These two files appear to be unused. I could only find references to them in .po files. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29556 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Passed QA |Pushed to master Version(s)| |22.05.00 released in| | --- Comment #7 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=29556 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29556 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Jonathan: Here is what makes the difference (yes it is confusing at least): MARC21slim2MODS.xsl contains <xsl:include href="MARC21slimUtils.xsl"/> This is our include that contains the template named part. But MARC21slim2MADS.xsl contains <xsl:include href="http://www.loc.gov/marcxml/xslt/MARC21slimUtils.xsl"/> This is NOT our include, but the LOC one. And it does not include a template named part. Etc. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29556 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Owen Leonard from comment #6)
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MADS.xsl
This seems to be an authority record export format which can be tested by viewing an authority in the staff interface and choosing Save -> MADS. The export appears to work correctly.
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS3-1.xsl
This seems to be a bibliographic record export format which can be tested by viewing a bibliographic record in the staff interface and choosing Save -> MODS. The export appears to work correctly.
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS3.xsl koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS32.xsl
These two files appear to be unused. I could only find references to them in .po files.
Thanks for checking. See former comment too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29556 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- What does not help either, is that opac/unapi runs INTRANET xslt sheets: sub get_xslt_file { my ($format, $format_to_stylesheet_map, $format_info) = @_; $format = lc $format; my $marcflavour = uc(C4::Context->preference('marcflavour')); return unless $format_to_stylesheet_map->{$marcflavour}->{$format}; my $xslt_file = C4::Context->config('intrahtdocs') . "/prog/en/xslt/" . $format_to_stylesheet_map->{$marcflavour}->{$format}; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29556 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29629 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Owen Leonard from comment #6)
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS3.xsl koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS32.xsl
These two files appear to be unused. I could only find references to them in .po files.
Lets remove them on bug 29629. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29556 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |kyle@bywatersolutions.com Version(s)|22.05.00 |22.05.00,21.11.01 released in| | --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.11.x for 21.11.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29556 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.05.00,21.11.01 |22.05.00,21.11.01,21.05.08 released in| | CC| |andrew@bywatersolutions.com Status|Pushed to stable |Pushed to oldstable --- Comment #13 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.08 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29556 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED --- Comment #14 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org