From 428e0081d3898c58153643dd13d854a49b844b2a Mon Sep 17 00:00:00 2001 From: Andreas Roussos Date: Tue, 28 Jan 2025 16:00:14 +0000 Subject: [PATCH] Bug 38987: Use the correct HTML id attribute Starting with Koha 24.11.01, we can no longer link authorities with other authorities (linking a bibliographic record with an authority still works fine). This affects both MARC21 and UNIMARC instances, and is valid on the main branch, too. This patch fixes that. Test plan: 1) Navigate to Koha's Authorities module and create a new authority (using the 'Default' authority type). In tab 5, expand field 500 by clicking on its description. 2) Launch the Authority finder form by clicking on the small 'Tag editor' button on the far right of subfield 500$a. 3) Click the yellow 'Search' button at the bottom of the page. When the results appear, click on the '+ Choose' button for one of the authorities (any authority will do). Notice that nothing happens and the Authority finder stays open, whereas normally it should close automatically at this point and transfer you back to the authority editor, copying the info from the authority you selected into the subfields of field 500. Press F12 (works in Chrome and Firefox) to launch the Developer Tools of your browser and notice that in the JavaScript console the following error message has been registered: "Uncaught TypeError: e is null" 4) Apply this patch (and restart_all for good measure), then press CTRL-F5 to reload all JS assets. 5) Repeat step 3) above; this time, when you click on the '+ Choose' button the authority finder window will close and the contents of the authority you selected will be copied into the subfields of field 500. Signed-off-by: David Nind --- .../prog/en/modules/authorities/searchresultlist-auth.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt index f96f30f856..bdf3415c5d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt @@ -142,8 +142,8 @@ function doauth(authid, index, repet){ [% IF source == 'auth' %] - var e = document.getElementById("relationship"); - var relationship = e.options[e.selectedIndex].value; + var elem = document.getElementById("special_relationship"); + var relationship = elem.options[elem.selectedIndex].value; jumpfull('blinddetail-biblio-search.pl?authid=' + authid + '&index=' + index + '&repet=' + repet + '&relationship=' + relationship); [% ELSE %] -- 2.39.5