[Koha-bugs] [Bug 30162] XSLT has broken link for traced series because of OPAC/staff interface confusion

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Sep 9 08:21:02 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30162

--- Comment #3 from Mark Hofstetter <koha at trust-box.at> ---
Created attachment 140360
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140360&action=edit
the Series link koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl is
not generated correctly

to reproduce

1. set UseControlNumber to "Use"
2. for the BKS Framework make 830 $0 $w $t $v editable
3. choose two records:
   A (eg Perl best practices / Damian Conway. (Record number 5)) as child
   B Programming Perl / Tom Christiansen, Brian D. Foy & Larry Wall. (Record
number 262) as parent record
4. edit the child record,
   - set 490 indicator 1 to 1
   - set 830$w (and maybe 830$0 to control-number of the parent in my case
17259930)
   - set 830$t = "perl series title" and 830$v = "Volume 1"

5. apply the patch as suggested by Katrin Fischer 2022-02-23 14:18:34 UTC

6. go to the child record, the "Series" link will be something like
opac-search.pl?q=rcn:17259930

7. if you click the link it leads to the child record itself and not to the
parent record

8. I would suggest the following patch point to the control-number
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl
b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl
index b734afd754..20d2c0ae83 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl
@@ -470,7 +470,7 @@
             <xsl:for-each select="marc:datafield[@tag=830]">
                 <xsl:choose>
                     <xsl:when test="$UseControlNumber = '1' and
marc:subfield[@code='w']">
-                        <a
href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
+                        <a><xsl:attribute name="href"><xsl:value-of
select="$searchurl"/>?q=control-number:<xsl:value-of
select="str:encode-uri(marc:subfield[@code='w'], true())"/></xsl:attribute>
                             <xsl:call-template name="chopPunctuation">
                                 <xsl:with-param name="chopString">
                                     <xsl:call-template name="subfieldSelect">

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list