Bug 10292 - XSLT files always taken from 'prog' theme for English
Summary: XSLT files always taken from 'prog' theme for English
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Galen Charlton
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks: 2774
  Show dependency treegraph
 
Reported: 2013-05-20 16:44 UTC by Galen Charlton
Modified: 2014-12-07 20:02 UTC (History)
4 users (show)

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


Attachments
bug 10292: improve fallback logic for picking XSLT (4.84 KB, patch)
2013-05-20 17:53 UTC, Galen Charlton
Details | Diff | Splinter Review
bug 10292: improve fallback logic for picking XSLT (4.89 KB, patch)
2013-05-28 19:12 UTC, Mirko Tietgen
Details | Diff | Splinter Review
bug 10292: improve fallback logic for picking XSLT (4.95 KB, patch)
2013-05-29 09:22 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Galen Charlton 2013-05-20 16:44:10 UTC
The commit for bug 8947 has the side-effect of (when the language is English) causing the theme syspref to be ignored when looking for an XSLT stylesheet for bib details or search result display.

To reproduce the bug:

[1] Make sure OPAC XSLT details is turned on and that English is the OPAC language.
[2] Create a new OPAC theme, including copying the XSLT files.
[3] Set opactheme to the new theme.
[4] Make a change to koha-tmpl/opac-tmpl/NEWTHEME/en/xslt/MARC21slim2OPACDetail.xsl
[5] View a bib record in the OPAC.  The change made in the previous step is not reflected.
Comment 1 Galen Charlton 2013-05-20 17:53:23 UTC Comment hidden (obsolete)
Comment 2 Mirko Tietgen 2013-05-28 19:12:39 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2013-05-29 09:21:58 UTC
QA comment:

This patch fixes a bug and improves the code.
No regression found.
Thanks for unit tests!

Marked as Passed QA.
Comment 4 Jonathan Druart 2013-05-29 09:22:28 UTC
Created attachment 18452 [details] [review]
bug 10292: improve fallback logic for picking XSLT

This patch fixes a bug whereby XSLT files from the
prog theme would be used (for English OPACs and staff
interfaces) even if the user had created and enabled a
custom theme that provided override XSLT files.

This patch provides a clearer implementation of the fallback
logic and adds test cases.

To reproduce the bug:

[1] Set OPACXSLTDetailsDisplay to 'default' and English as the OPAC
    language.
[2] Create a new OPAC theme, including copying the XSLT files.
[3] Set opactheme to the new theme.
[4] Make a change to koha-tmpl/opac-tmpl/NEWTHEME/en/xslt/MARC21slim2OPACDetail.xsl
[5] View a bib record in the OPAC. The change made in the previous step
    is not reflected.

To test after applying the patch:

[6] Reload the bib record in the OPAC. The change made in step 4 should
    now be reflected.
[7] (To be thorough) Go through the test plan for bug 8947
    and verify that there is no regression.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 5 Galen Charlton 2013-05-29 14:40:27 UTC
Pushed to master.
Comment 6 Tomás Cohen Arazi 2013-06-04 15:54:11 UTC
This patch has been pushed to 3.12.x, will be in 3.12.1. Thanks for the fix Kyle!
Comment 7 Tomás Cohen Arazi 2013-06-04 15:56:24 UTC
(In reply to comment #6)
> This patch has been pushed to 3.12.x, will be in 3.12.1. Thanks for the fix
> Kyle!

Thanks Galen, I mixed my bug comments with 10262 :-D
Comment 8 Bernardo Gonzalez Kriegel 2013-06-10 23:08:43 UTC
Pushed to 3.10.x, will be in 3.10.7