Bugzilla – Attachment 157211 Details for
Bug 35058
No contents displaying when an authority record is saved
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35058: Automatically show authority tab 0 if DefaultAuthorityTab is empty
Bug-35058-Automatically-show-authority-tab-0-if-De.patch (text/plain), 2.30 KB, created by
Katrin Fischer
on 2023-10-16 19:42:18 UTC
(
hide
)
Description:
Bug 35058: Automatically show authority tab 0 if DefaultAuthorityTab is empty
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-10-16 19:42:18 UTC
Size:
2.30 KB
patch
obsolete
>From e75eafd6863c6516b3d70a49e2779fce55c51840 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 16 Oct 2023 11:02:00 +0000 >Subject: [PATCH] Bug 35058: Automatically show authority tab 0 if > DefaultAuthorityTab is empty > >The change to the authority detail page made by Bug 34075 didn't take >into account the possibility that the DefaultAuthorityTab tab preference >might be empty. This leads to a JavaScript error and no tabs being >shown. > >We can avoid this situation by initializing the tab_object variable as >an empty object. > >To test, apply the patch and go to Authorities to repeat the test plan >for Bug 34075: > >1. Locate and view the detail page for an authority record. >2. The page should default to the 0XX or first tab. >3. Go to Administration -> System preferences and set the > DefaultAuthorityTab preference to a number that won't be found > in your authority record (e.g. there are no 3XX tags defined). >4. Return to the detail page and verify that the first tab is displayed. >5. Set DefaultAuthorityTab to 1XX or greater, one that exists in your > record. >6. Reload the detail page and confirm the correct tab is selected. >7. Test the case where DefaultAuthorityTab is undefined by directly > updating the database. In koha-testing-docker you can run this > command: > > echo "update systempreferences set value = 3 where variable = 'DefaultAuthorityTab';" | koha-mysql kohadev > > Return to the authority detail tab to confirm that the first tab is > displayed. > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt >index ed8462716d..74ab0c56ee 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt >@@ -136,7 +136,7 @@ > <script> > $(document).ready(function() { > if( $("#authoritiestabs .tab-pane.active").length < 1 ){ >- let tab_object; >+ let tab_object = []; > > [% SET DefaultAuthorityTab = Koha.Preference('DefaultAuthorityTab') %] > [% IF DefaultAuthorityTab %] >-- >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 35058
:
157181
| 157211