@@ -, +, @@ --- C4/Output.pm | 4 ++++ cataloguing/additem.pl | 4 ++++ koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) --- a/C4/Output.pm +++ a/C4/Output.pm @@ -338,6 +338,10 @@ sub output_and_exit_if_error { elsif( not $logged_in_user->can_see_patron_infos( $current_patron ) ) { $error = 'cannot_see_patron_infos'; } + } elsif ( $params->{module} eq 'cataloguing' ) { + # We are testing the record to avoid additem to fetch the Koha::Biblio + # But in the long term we will want to get a biblio in parameter + $error = 'unknown_biblio' unless $params->{record}; } } --- a/cataloguing/additem.pl +++ a/cataloguing/additem.pl @@ -421,6 +421,10 @@ $restrictededition = 0 if ($restrictededition != 0 && $frameworkcode eq 'FA' && my $tagslib = &GetMarcStructure(1,$frameworkcode); my $record = GetMarcBiblio({ biblionumber => $biblionumber }); + +output_and_exit_if_error( $input, $cookie, $template, + { module => 'cataloguing', record => $record } ); + my $oldrecord = TransformMarcToKoha($record); my $itemrecord; my $nextop="additem"; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -32,7 +32,7 @@
- + [% INCLUDE 'blocking_errors.inc' %]

Items for [% title | html %] [% IF ( author ) %] by [% author | html %][% END %] (Record #[% biblionumber | html %])

[% IF ( barcode_not_unique ) %]
Error saving item: Barcode must be unique.
[% END %] --