@@ -, +, @@ --- Koha/UI/Form/Builder/Item.pm | 6 +++--- tools/batchMod.pl | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) --- a/Koha/UI/Form/Builder/Item.pm +++ a/Koha/UI/Form/Builder/Item.pm @@ -162,7 +162,7 @@ sub generate_subfield_form { my $CNsubfields = substr( $pref_itemcallnumber_part, 3 ); # Any and all subfields $CNsubfields = undef if $CNsubfields eq ''; - my $temp2 = $marc_record->field($CNtag); + my $temp2 = $marc_record ? $marc_record->field($CNtag) : undef; next unless $temp2; $value = $temp2->as_string( $CNsubfields, ' ' ); @@ -314,7 +314,7 @@ sub generate_subfield_form { ); my $pars = { dbh => $dbh, - record => $marc_record, + record => $marc_record, #Note: could be undefined tagslib => $tagslib, id => $subfield_data{id}, }; @@ -564,7 +564,7 @@ sub edit_form { value => $value, tagslib => $tagslib, libraries => $libraries, - marc_record => $marc_record, + marc_record => $marc_record, #Note: could be undefined restricted_edition => $restricted_edition, prefill_with_default_values => $prefill_with_default_values, branch_limit => $branch_limit, --- a/tools/batchMod.pl +++ a/tools/batchMod.pl @@ -265,9 +265,7 @@ if ($op eq "show"){ # Getting list of subfields to keep when restricted batchmod edit is enabled my @subfields_to_allow = $restrictededition ? split ' ', C4::Context->preference('SubfieldsToAllowForRestrictedBatchmod') : (); - $biblionumber = Koha::Items->find($itemnumbers[0])->unblessed->{biblionumber} if $itemnumbers[0]; - my $subfields = Koha::UI::Form::Builder::Item->new( - { biblionumber => $biblionumber } )->edit_form( + my $subfields = Koha::UI::Form::Builder::Item->new->edit_form( # NOTE: We are not passing a biblionumber intentionally ! { restricted_editition => $restrictededition, ( --