@@ -, +, @@ --- catalogue/moredetail.pl | 8 ++++++++ .../prog/en/modules/catalogue/moredetail.tt | 20 ++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) --- a/catalogue/moredetail.pl +++ a/catalogue/moredetail.pl @@ -99,6 +99,14 @@ for my $itm (@all_items) { my $record=GetMarcBiblio({ biblionumber => $biblionumber }); +if ( not defined $record ) { + # biblionumber invalid -> report and exit + $template->param( unknownbiblionumber => 1, + biblionumber => $biblionumber ); + output_html_with_http_headers $query, $cookie, $template->output; + exit; +} + my $hostrecords; # adding items linked via host biblios my @hostitems = GetHostItemsInfo($record); --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -3,7 +3,13 @@ [% USE Branches %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -Koha › Catalog › Item details for [% title | html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield | html %][% END %] +Koha › Catalog › + [% IF ( unknownbiblionumber ) %] + Unknown record + [% ELSE %] + Item details for [% title | html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield | html %][% END %] + [% END %] + [% INCLUDE 'doc-head-close.inc' %] @@ -12,10 +18,19 @@ [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] - +
+[% IF ( unknownbiblionumber ) %] +
The record you requested does not exist ([% biblionumber %]).
+[% ELSE %]
@@ -282,4 +297,5 @@ browser.show(); [% END %] +[% END %] [% INCLUDE 'intranet-bottom.inc' %] --