From dc3c5f69c6384b8918722354ca5b128b5d8f2f8f Mon Sep 17 00:00:00 2001 From: Phil Ringnalda Date: Thu, 13 Mar 2025 20:41:26 -0700 Subject: [PATCH] Bug 25318: (follow-up) Make searchType be defined in merge.tt With authorities_js.inc doing "var searchType = '[% marclist | html %]';" in merge.tt where marclist isn't defined we got "var searchType = '';". This patch just adds 'const searchType = ""' directly to merge.tt to avoid a JavaScript console error. Test plan: 1. Open the devtools console 2. Do an authority search that returns at least two authorities 3. Select one, then another for merge 4. When the merge.pl page loads, observe an "Uncaught ReferenceError" in the console 5. Apply followup, repeat steps 1-3, without an "Uncaught ReferenceError" Signed-off-by: David Nind --- koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt index 179da2dd3d..1ddf1ca63d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt @@ -140,6 +140,9 @@ [% END %] [% MACRO jsinclude BLOCK %] + [% Asset.js("js/authorities.js") | $raw %] [% Asset.js("js/merge-record.js") | $raw %]