[Koha-bugs] [Bug 23423] New: Online resource links which are OPAC retrieve file references are not correctly formatted in the OPAC detail view

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Aug 3 11:27:27 CEST 2019


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

            Bug ID: 23423
           Summary: Online resource links which are OPAC retrieve file
                    references are not correctly formatted in the OPAC
                    detail view
 Change sponsored?: ---
           Product: Koha
           Version: 19.05
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: OPAC
          Assignee: oleonard at myacpl.org
          Reporter: steve at softwaremage.co.nz
        QA Contact: testopia at bugs.koha-community.org

Created attachment 91946
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91946&action=edit
Example markup

Symptom:
<span class="results_summary online_resources">
<span class="label">Online resources: 
</span><a property="url"
href="http:///cgi-bin/koha/opac-retrieve-file.pl?id=f445180b2247beac068a3bdef750856b"
target="_blank">PDF Views of <span class="term">Acca</span>, Haifa, Mt. Carmel
and Other Places</a> | 

<a property="url"
href="http:///cgi-bin/koha/opac-retrieve-file.pl?id=343848fcfdc5123bedf606f5b98110d6"
target="_blank">PDF Views of <span class="term">Acca</span>, Haifa, Mt. Carmel
and Other Places (Annotated Version)</a>  </span>

href is malformed: http:///cgi-bin/koha

Cause ??

Looks like problem in XSLT (fragment from MARC21slim2OPACDetail.xsl)

<xsl:if test="not(contains(marc:subfield[@code='u'],'://'))">
                            <xsl:choose>
                                <xsl:when test="@ind1=7">
                                    <xsl:value-of
select="marc:subfield[@code='2']"/><xsl:text>://</xsl:text>
                                </xsl:when>
                                <xsl:when test="@ind1=1">
                                    <xsl:text>ftp://</xsl:text>
                                </xsl:when>
                                <xsl:otherwise>
                                    <xsl:text>http://</xsl:text>
                                </xsl:otherwise>
                            </xsl:choose>


Note these same resource links are correct in the opac search view.

<span class="results_summary online_resources">
<span class="label">Online access: </span><a target="_blank"
href="/cgi-bin/koha/opac-retrieve-file.pl?id=f445180b2247beac068a3bdef750856b">PDF
Views of <span class="term">Acca</span>, Haifa, Mt. Carmel and Other Places</a> 

| <a target="_blank"
href="/cgi-bin/koha/opac-retrieve-file.pl?id=343848fcfdc5123bedf606f5b98110d6">PDF
Views of <span class="term">Acca</span>, Haifa, Mt. Carmel and Other Places
(Annotated Version)</a> </span>

If one explicitly adds the full path to the 856u URI these are correctly
referenced in the resulting markup. Relative paths are not.

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


More information about the Koha-bugs mailing list