@@ -, +, @@ --- patroncards/edit-profile.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/patroncards/edit-profile.pl +++ a/patroncards/edit-profile.pl @@ -88,7 +88,9 @@ foreach my $unit (@$units) { } } -$template->param(profile_id => $profile->get_attr('profile_id')) if $profile->get_attr('profile_id') > 0; +if ($profile_id) { # if new layout, there will be no profile id, so shouldn't look for it + $template->param(profile_id => $profile->get_attr('profile_id')) if $profile->get_attr('profile_id') > 0; +} $template->param( label_template => $label_template[0]->{'template_code'} || '', --