From 7a8ddb640968650d4260010bd072af23b2ee6572 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 11 Mar 2025 10:37:44 +0100 Subject: [PATCH] Bug 39300: Fix quick edit of subfields Searching tag$subfield in the framework should redirect to the edition of the tag with the subfield tab selected. This has been broken when we used the wrapper for tabs on bug 33178. Test plan: Edit a framework http://localhost:8081/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode= Search for 952$c => You are redirected to the edition of 952 and the "c" tab is selected Signed-off-by: Owen Leonard Signed-off-by: Julian Maurice --- admin/marctagstructure.pl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index d59e8aa2e8..8e3301e7a6 100755 --- a/admin/marctagstructure.pl +++ b/admin/marctagstructure.pl @@ -310,12 +310,11 @@ if ( $op eq 'add_form' ) { # Hidden feature: If search was field$subfield, redirect to the subfield edit form my ( $tagfield, $tagsubfield ) = split /\$/, $searchfield; if ($tagsubfield) { - print $input->redirect( '/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=' - . $tagfield - . '&frameworkcode=' - . $frameworkcode . '#sub' - . $tagsubfield - . 'field' ); + print $input->redirect( + sprintf + '/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=%s&frameworkcode=%s#%s_panel', + $tagfield, $frameworkcode, $tagsubfield + ); exit; } -- 2.39.5