Bug 4884

Summary: opac-showmarc.pl can't find compact.xsl
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: PATCH-Sent (DO NOT USE) CC: gmcharlt
Version: rel_3_2   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Proposed fix

Description Fridolin Somers 2010-06-10 16:32:57 UTC
When using opac-showmarc with viewas=card, page fails :

ie : "/cgi-bin/koha/opac-showmarc.pl?id=1&viewas=card" : 

Could not create file parser context for file "/usr/share/koha/intranet/cgi-bin/koha-tmpl/intranet-tmpl/prog/en/xslt/compact.xsl": No such file or directory at /usr/share/koha/opac/cgi-bin/opac/opac-showmarc.pl line 71

Bug is at L67 : 
my $xslfile = C4::Context->config('intranetdir')."/koha-tmpl/intranet-tmpl/prog/en/xslt/compact.xsl";

This path is right for development installation but wrong for standard installation where "intranetdir" is "/usr/share/koha/intranet/cgi-bin".


I propose this correction : 
my $xslfile = C4::Context->config('intrahtdocs')."/prog/en/xslt/compact.xsl";

NB : actually, no link to opac-showmarc.pl contains "viewas=card", is it obsolete ?

Tested on Koha 3.2 alpha 2 UNIMARC.
Comment 1 Owen Leonard 2010-06-10 17:11:03 UTC
Created attachment 2238 [details] [review]
Proposed fix

This patch implements Fridolyn SOMERS' suggested change to the .xsl file path but copies compact.xsl from the intranet template dir and points to that instead.
Comment 2 Fridolin Somers 2010-06-11 06:31:32 UTC
Yes, that's much better.

(In reply to comment #1)
> Created attachment 2238 [details] [review]
> Proposed fix
> 
> This patch implements Fridolyn SOMERS' suggested change to the .xsl file path
> but copies compact.xsl from the intranet template dir and points to that
> instead.
Comment 3 Galen Charlton 2010-06-24 02:47:15 UTC
Patch pushed.  Please test and close.