Summary: | OPAC Overdrive search result page broken for translations | ||
---|---|---|---|
Product: | Koha | Reporter: | Alex Buckley <alexbuckley> |
Component: | I18N/L10N | Assignee: | Alex Buckley <alexbuckley> |
Status: | CLOSED FIXED | QA Contact: | Katrin Fischer <katrin.fischer> |
Severity: | normal | ||
Priority: | P5 - low | CC: | arthur.suzuki, f.demians, lucas, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23713 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30991 |
||
Change sponsored?: | Sponsored | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
22.11.00, 22.05.03, 21.11.11, 21.05.18
|
|
Circulation function: | |||
Attachments: |
Bug 30958: OPAC overdrive search result page broken for translations
Bug 30958: OPAC overdrive search result page broken for translations Bug 30958: OPAC overdrive search result page broken for translations |
Description
Alex Buckley
2022-06-13 22:38:26 UTC
Created attachment 136056 [details] [review] 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 Created attachment 136068 [details] [review] 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> There are a couple of other instances that I saw which should also be addressed. I searched the NZ templates for "1[% ELSE %][% END %]" I've filed Bug 30991 - [% ELSE %]0[% END %] will break translations if used for assigning variables for fixing any other occurrences so this can move on. Created attachment 136310 [details] [review] 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> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 22.11. Nice work everyone, thanks! Backported to 22.05.x for 22.05.03 backported to 21.11.x for 21.11.11 Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document, marking resolved. (In reply to Victor Grousset/tuxayo from comment #9) > Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. > > Nothing to document, marking resolved. Hi Victor, We have a client (Melbourne Athenaeum Library - who sponsored this fix) running 21.05.x who would love to have this fix before their next Koha upgrade. Would it be possible for you to backport this fix to 21.05.x please? Many thanks! Alex Sure, will try in the next days :) (In reply to Victor Grousset/tuxayo from comment #11) > Sure, will try in the next days :) Thanks very much Victor :) Backported: Pushed to 21.05.x branch for 21.05.18 (In reply to Victor Grousset/tuxayo from comment #13) > Backported: Pushed to 21.05.x branch for 21.05.18 Thanks Victor! |