Bugzilla – Attachment 136068 Details for
Bug 30958
OPAC Overdrive search result page broken for translations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30958: OPAC overdrive search result page broken for translations
Bug-30958-OPAC-overdrive-search-result-page-broken.patch (text/plain), 2.37 KB, created by
Owen Leonard
on 2022-06-14 12:02:03 UTC
(
hide
)
Description:
Bug 30958: OPAC overdrive search result page broken for translations
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2022-06-14 12:02:03 UTC
Size:
2.37 KB
patch
obsolete
>From 036f25e254b46662333be8c949aa75c4467e7e3a Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Mon, 13 Jun 2022 22:54:54 +0000 >Subject: [PATCH] Bug 30958: OPAC overdrive search result page broken for > translations > >Note: You will need a valid OverDrive subscription to test this. > >This patch fixes a JavaScript error thrown on the OPAC overdrive search >results page for libraries using translation templates and who don't >have the OverDrivePasswordRequired system preference = 'Required'. > >Test plan: >1. Install the en-NZ translation: https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client > >2. Enable the en-NZ language: > - In the OPACLanguages system preference -> tick 'English New Zealand > (en-NZ)' checkbox and untick 'English (en)' > >3. Fill in the OverDrive system preferences: > - Make sure you set: OverDrivePasswordRequired = "Not required" > >4. Perform an OPAC search > >5. Click on the Overdrive results link > >6. Open the browser console and notice there is a JS error, and the > OverDrive results do not load > >7. Apply patch > >8. Update the en_NZ translation: > >9. Repeat steps 4, 5 and 6 and notice there is no JavaScript error and > the OverDrive results do display > >Sponsored-by: Melbourne Athenaeum Library, Australia > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > .../opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt >index d6542c5787..ae67690b2d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt >@@ -72,7 +72,11 @@ > [% BLOCK jsinclude %] > [% Asset.js("js/overdrive.js") | $raw %] > <script> >- var OD_password_required = [% IF Koha.Preference('OverDrivePasswordRequired') %]1[% ELSE %]0[% END %]; >+ [%- IF Koha.Preference('OverDrivePasswordRequired') -%] >+ var OD_password_required = 1; >+ [%- ELSE -%] >+ var OD_password_required = 0; >+ [%- END -%] > var querystring = "[% q |replace( "'", "\'" ) |replace( '\n', '\\n' ) |replace( '\r', '\\r' ) | html %]"; > var results_per_page = [% OPACnumSearchResults | html %]; > >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30958
:
136056
|
136068
|
136310