From b04c4456dbb79c8c575ec0d3600f2b01caa54c59 Mon Sep 17 00:00:00 2001 From: David Kuhn Date: Sat, 31 Aug 2019 16:23:16 -0700 Subject: [PATCH] Bug 23527 - BakerTaylorBookstoreURL is converted to escaped characters by template, rendering it invalid Changing the template toolkit filter for rendering the value of BakerTaylorBookstoreURL in opac-detail.tt and opac-results.tt from uri to url fixes the problem. To test (requires a Baker & Taylor username and password): 1. Enter the B&T url into BakerTaylorBookstoreURL. 2. Set BakerTaylorEnabled to "add" and enter your username and password. 3. Look up a title in the OPAC. 4. Locate a title with a cover image. 5. Click on the cover image. You are not redirected to the url stored in BakerTaylorBookstoreURL. 6. Display the full record for the title 7. Click on the cover image. You are not redirected to the url stored in BakerTaylorBookstoreURL. 8. Apply the patch. 9. Refresh the OPAC display. 10. Click on the cover image. You are now redirected to the specified url. 11. Return to the results list. 12. Click on a cover image. You are now redirected to the specified url. --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 4 ++-- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index 8afe1b7..18596ef 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -89,9 +89,9 @@ [% IF ( BakerTaylorEnabled && bt_id ) %] [% IF BakerTaylorBookstoreURL %] [% IF ( OPACURLOpenInNewWindow ) %] - See Baker & Taylor + See Baker & Taylor [% ELSE %] - See Baker & Taylor + See Baker & Taylor [% END %] [% ELSE %] See Baker & Taylor diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt index 12c9a2d..4b7f791 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -314,7 +314,7 @@ [% IF ( BakerTaylorEnabled && BakerTaylorBookstoreURL ) %] [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %] [% IF ( bt_id ) %] - + See Baker & Taylor [% ELSE %] -- 2.1.4