From 95e659976579b473f8242683ee7dd20fb41c7b9b Mon Sep 17 00:00:00 2001 From: Andrew Nugged Date: Wed, 20 Jul 2022 02:12:49 +0300 Subject: [PATCH] Bug 20447: (QA follow-up) Show blocking full-screen error if biblio record removed elsewhere (biblio id not found). Rebased-by: Andrew Nugged --- cataloguing/addholding.pl | 6 +++++- .../intranet-tmpl/prog/en/modules/cataloguing/addholding.tt | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cataloguing/addholding.pl b/cataloguing/addholding.pl index 29b425779b..2526c11ce7 100755 --- a/cataloguing/addholding.pl +++ b/cataloguing/addholding.pl @@ -23,7 +23,7 @@ use Modern::Perl; use CGI q(-utf8); -use C4::Output qw( output_html_with_http_headers ); +use C4::Output qw( output_html_with_http_headers output_and_exit ); use C4::Auth qw( get_template_and_user haspermission ); use C4::Biblio qw( GetMarcFromKohaField GetMarcStructure GetUsedMarcStructure TransformHtmlToMarc ); @@ -678,6 +678,10 @@ if (!$biblionumber) { $biblionumber = $record->biblionumber; } my $biblio = Koha::Biblios->find($biblionumber); + +output_and_exit( $input, $cookie, $template, 'unknown_biblio') + unless $biblio; + build_tabs($template, $marc, C4::Context->dbh, '', $input); $template->param( holding_id => $holding_id, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addholding.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addholding.tt index 15008c6117..e21a5b825b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addholding.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addholding.tt @@ -547,6 +547,8 @@ function PopupMARCFieldDoc(field) { + [% INCLUDE 'blocking_errors.inc' %] +
-- 2.37.2