Bug 9570 - view plain not working in ccsr
Summary: view plain not working in ccsr
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Owen Leonard
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-07 20:00 UTC by Nicole C. Engard
Modified: 2014-05-26 21:04 UTC (History)
2 users (show)

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


Attachments
error (79.03 KB, image/png)
2013-02-07 20:00 UTC, Nicole C. Engard
Details
Bug 9570 - view plain not working in ccsr (2.60 KB, patch)
2013-02-12 16:14 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9570 - view plain not working in ccsr (2.64 KB, patch)
2013-02-12 21:07 UTC, Nicole C. Engard
Details | Diff | Splinter Review
[PASSED QA] Bug 9570 - view plain not working in ccsr (2.78 KB, patch)
2013-03-06 07:12 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2013-02-07 20:00:15 UTC
Created attachment 15149 [details]
error

When in the OPAC, if you click 'marc view' and then 'view plain' you get the attached error.  Basically there is no plain view when in CCSR for some reason.

Tested on 3.10.2
Comment 1 Owen Leonard 2013-02-12 16:14:25 UTC Comment hidden (obsolete)
Comment 2 Nicole C. Engard 2013-02-12 21:07:27 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2013-02-14 14:42:25 UTC
QA comment:

    $xslfilename = "$htdocs/$theme/$lang/xslt/$xslfile";
    $xslfilename = "$htdocs/$theme/en/xslt/$xslfile" unless ( $lang ne 'en' && -f $xslfilename );
    $xslfilename = "$htdocs/prog/$lang/xslt/$xslfile" unless ( -f $xslfile );
    $xslfilename = "$htdocs/prog/en/xslt/$xslfile" unless ( $lang ne 'en' && -f $xslfilename );

Should the 3rd line be
        $xslfilename = "$htdocs/prog/$lang/xslt/$xslfile" unless ( -f $xslfilename );
?
Comment 4 Katrin Fischer 2013-03-06 07:12:45 UTC
Created attachment 15902 [details] [review]
[PASSED QA] Bug 9570 - view plain not working in ccsr

The code in opac-showmarc.pl isn't smart enough to find the xsl files in
the "default" (prog) theme if the ccsr theme is enabled, so the "view
plain" option on opac-MARCdetail.pl fails ever time.

This patch copies some path-handling code from XSLT.pm to improve xsl
file path handling when dealing with a "sub-theme."

To test, view the MARC view in the OPAC and click the "view plain" link.
This should work correctly in prog and ccsr themes and with different
languages enabled (keeping in mind the ccsr theme will fail in general
for languages other than en).

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Checked plain view works in both prog and ccsr themes now.
All tests and QA script pass.
Comment 5 Jared Camins-Esakov 2013-03-07 14:34:48 UTC
This patch has been pushed to master.

It would be great to handle the XSLT for the MARC view in C4::XSLT, but this fix is suitable for the time being.
Comment 6 Chris Cormack 2013-03-11 09:39:44 UTC
Pushed to 3.10.x will be in 3.10.4