Bug 9570

Summary: view plain not working in ccsr
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: major    
Priority: P5 - low CC: chris, jonathan.druart
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10647
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
Bug 9570 - view plain not working in ccsr
[SIGNED-OFF] Bug 9570 - view plain not working in ccsr
[PASSED QA] Bug 9570 - view plain not working in ccsr

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