Bug 4884 - opac-showmarc.pl can't find compact.xsl
Summary: opac-showmarc.pl can't find compact.xsl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: rel_3_2
Hardware: All All
: PATCH-Sent (DO NOT USE) normal (vote)
Assignee: Owen Leonard
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-10 16:32 UTC by Fridolin Somers
Modified: 2012-10-25 22:52 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Proposed fix (5.20 KB, patch)
2010-06-10 17:11 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.