Summary: | Missing "USE Koha" causes JS errors and missing "Last patron" menu | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | Templates | Assignee: | Owen Leonard <oleonard> |
Status: | Pushed to main --- | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | minor | ||
Priority: | P5 - low | CC: | baptiste.wojtkowski, david, fridolin.somers, jonathan.druart, kyle, m.de.rooy, martin.renvoize, nick, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Medium patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes the cause of the "Last patron" menu not displaying on many staff interface pages, or generating JavaScript errors (where showLastPatron is enabled). (It adds "[% USE Koha %]" to templates where it was missing. It also removes some duplicate USE entries.)
|
Version(s) released in: |
25.05.00
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 38723 | ||
Attachments: |
Bug 37634: Missing "USE Koha" causes JS errors and missing "Last patron" menu
Bug 37634: Missing "USE Koha" causes JS errors and missing "Last patron" menu Bug 37634: Missing "USE Koha" causes JS errors and missing "Last patron" menu Bug 37634: Missing "USE Koha" causes JS errors and missing "Last patron" menu Bug 37634: Missing "USE Koha" causes JS errors and missing "Last patron" menu Bug 37634: (follow-up) Add 'Koha' to LOAD_PLUGINS Bug 37634: Remove [% USE Koha %] from all templates |
Description
Katrin Fischer
2024-08-13 17:00:20 UTC
Also in "Files" tab Created attachment 174986 [details] [review] Bug 37634: Missing "USE Koha" causes JS errors and missing "Last patron" menu This patch adds "[% USE Koha %]" to templates which lack it. Without this, the "Last patron" menu item doesn't work and will cause a JS error on many pages. The patch also removes some USE entries which were duplicates. To test, apply the patch and test all 176 different pages to confirm they all work correctly. I mean, maybe. Or maybe sample a few to confirm they work? - Go to Administration -> System preferences and enable "showLastPatron" - If the preference was not enabled, you probably need to go to Circulation and open a patron account for checkout so that there is a "last patron" to show. - Test a sampling of pages affected by this patch: - Acquisitions -> Acquisitions home page - Administration -> Cities and towns - Catalog -> Item search - Cataloging -> Label creator - Patrons -> Patron account -> Set permissions - Reports -> Items lost - Serials -> Serials home page - Tools -> Calendar - Pages which had duplicate lines (not necessarily "USE Koha"): - Acquisitions -> Vendor -> Receive shipments - Administration -> Manage jobs - Administration -> Record overlay rules - Catalog -> Search results - Catalog -> Bibliographic detail page -> Items - Circulation -> Holds queue - Patrons -> Patron detail page -> Accounting -> Transactions tab - Serials -> Subscription details -> Create/edit routing list - OPAC -> Search results -> Request article Sponsored-by: Athens County Public Libraries Created attachment 175038 [details] [review] Bug 37634: Missing "USE Koha" causes JS errors and missing "Last patron" menu This patch adds "[% USE Koha %]" to templates which lack it. Without this, the "Last patron" menu item doesn't work and will cause a JS error on many pages. The patch also removes some USE entries which were duplicates. To test, apply the patch and test all 176 different pages to confirm they all work correctly. I mean, maybe. Or maybe sample a few to confirm they work? - Go to Administration -> System preferences and enable "showLastPatron" - If the preference was not enabled, you probably need to go to Circulation and open a patron account for checkout so that there is a "last patron" to show. - Test a sampling of pages affected by this patch: - Acquisitions -> Acquisitions home page - Administration -> Cities and towns - Catalog -> Item search - Cataloging -> Label creator - Patrons -> Patron account -> Set permissions - Reports -> Items lost - Serials -> Serials home page - Tools -> Calendar - Pages which had duplicate lines (not necessarily "USE Koha"): - Acquisitions -> Vendor -> Receive shipments - Administration -> Manage jobs - Administration -> Record overlay rules - Catalog -> Search results - Catalog -> Bibliographic detail page -> Items - Circulation -> Holds queue - Patrons -> Patron detail page -> Accounting -> Transactions tab - Serials -> Subscription details -> Create/edit routing list - OPAC -> Search results -> Request article Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> Testing notes (using KTD): 1. The pages to check in the test plan: 1.1 JavaScript error message only generated on Patrons > Patron account > Set permissions 1.2 Before the patch, most pages were missing the "Last patron" menu. 1.3 After the patch, the "Last patron" menu now appears on all pages checked. Should we add a test or something to the QA tools to check for "[% USE Koha %]" in all template pages? (I don't know how this is to do 8-).) Created attachment 175447 [details] [review] Bug 37634: Missing "USE Koha" causes JS errors and missing "Last patron" menu This patch adds "[% USE Koha %]" to templates which lack it. Without this, the "Last patron" menu item doesn't work and will cause a JS error on many pages. The patch also removes some USE entries which were duplicates. To test, apply the patch and test all 176 different pages to confirm they all work correctly. I mean, maybe. Or maybe sample a few to confirm they work? - Go to Administration -> System preferences and enable "showLastPatron" - If the preference was not enabled, you probably need to go to Circulation and open a patron account for checkout so that there is a "last patron" to show. - Test a sampling of pages affected by this patch: - Acquisitions -> Acquisitions home page - Administration -> Cities and towns - Catalog -> Item search - Cataloging -> Label creator - Patrons -> Patron account -> Set permissions - Reports -> Items lost - Serials -> Serials home page - Tools -> Calendar - Pages which had duplicate lines (not necessarily "USE Koha"): - Acquisitions -> Vendor -> Receive shipments - Administration -> Manage jobs - Administration -> Record overlay rules - Catalog -> Search results - Catalog -> Bibliographic detail page -> Items - Circulation -> Holds queue - Patrons -> Patron detail page -> Accounting -> Transactions tab - Serials -> Subscription details -> Create/edit routing list - OPAC -> Search results -> Request article Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> Created attachment 175591 [details] [review] Bug 37634: Missing "USE Koha" causes JS errors and missing "Last patron" menu This patch adds "[% USE Koha %]" to templates which lack it. Without this, the "Last patron" menu item doesn't work and will cause a JS error on many pages. The patch also removes some USE entries which were duplicates. To test, apply the patch and test all 176 different pages to confirm they all work correctly. I mean, maybe. Or maybe sample a few to confirm they work? - Go to Administration -> System preferences and enable "showLastPatron" - If the preference was not enabled, you probably need to go to Circulation and open a patron account for checkout so that there is a "last patron" to show. - Test a sampling of pages affected by this patch: - Acquisitions -> Acquisitions home page - Administration -> Cities and towns - Catalog -> Item search - Cataloging -> Label creator - Patrons -> Patron account -> Set permissions - Reports -> Items lost - Serials -> Serials home page - Tools -> Calendar - Pages which had duplicate lines (not necessarily "USE Koha"): - Acquisitions -> Vendor -> Receive shipments - Administration -> Manage jobs - Administration -> Record overlay rules - Catalog -> Search results - Catalog -> Bibliographic detail page -> Items - Circulation -> Holds queue - Patrons -> Patron detail page -> Accounting -> Transactions tab - Serials -> Subscription details -> Create/edit routing list - OPAC -> Search results -> Request article Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 175592 [details] [review] Bug 37634: Missing "USE Koha" causes JS errors and missing "Last patron" menu This patch adds "[% USE Koha %]" to templates which lack it. Without this, the "Last patron" menu item doesn't work and will cause a JS error on many pages. The patch also removes some USE entries which were duplicates. To test, apply the patch and test all 176 different pages to confirm they all work correctly. I mean, maybe. Or maybe sample a few to confirm they work? - Go to Administration -> System preferences and enable "showLastPatron" - If the preference was not enabled, you probably need to go to Circulation and open a patron account for checkout so that there is a "last patron" to show. - Test a sampling of pages affected by this patch: - Acquisitions -> Acquisitions home page - Administration -> Cities and towns - Catalog -> Item search - Cataloging -> Label creator - Patrons -> Patron account -> Set permissions - Reports -> Items lost - Serials -> Serials home page - Tools -> Calendar - Pages which had duplicate lines (not necessarily "USE Koha"): - Acquisitions -> Vendor -> Receive shipments - Administration -> Manage jobs - Administration -> Record overlay rules - Catalog -> Search results - Catalog -> Bibliographic detail page -> Items - Circulation -> Holds queue - Patrons -> Patron detail page -> Accounting -> Transactions tab - Serials -> Subscription details -> Create/edit routing list - OPAC -> Search results -> Request article Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 175593 [details] [review] Bug 37634: (follow-up) Add 'Koha' to LOAD_PLUGINS This patch adds the Koha plugin that's used in almost every template and include for some basic functions to the LOAD_PLUGINS directive on Template load.. this way we shouldn't need to keep adding it to the top of every TT file. Created attachment 175594 [details] [review] Bug 37634: Remove [% USE Koha %] from all templates We now load this plugin by default using LOAD_PLUGINS so we no longer need to reference it in a USE statement in every template file. So.. it felt a bit mad adding all these USE statements to pretty much every template file in Koha so I asked myself.. "Can't we just load that plugin by default?" Setting back to NSO to get some attention and testing. Obsoleted my follow-ups and moved them to their own bug. Are we going to add it even if the template does not use it? I don't think it's a good idea... Glad to see this fixed :) Pushed for 25.05! Well done everyone, thank you! |