@@ -, +, @@ --- C4/Templates.pm | 7 +++++++ members/memberentry.pl | 4 ++++ members/paycollect.pl | 3 +++ 3 files changed, 14 insertions(+) --- a/C4/Templates.pm +++ a/C4/Templates.pm @@ -113,6 +113,13 @@ sub output { $vars->{opaclayoutstylesheet} = C4::Context->preference('opaclayoutstylesheet'); + + if(exists $self->{VARS}{lang}) { + warn "Preventing \$template->lang='" . ($self->{vars}{lang}//'-undef-') + . "' to be overwritten by template->{VARS}{lang}='" . ($self->{VARS}{lang}//'-undef-') . "'"; + delete $self->{VARS}{lang}; + } + # add variables set via param to $vars for processing $vars = { %$vars, %{ $self->{VARS} } }; --- a/members/memberentry.pl +++ a/members/memberentry.pl @@ -813,6 +813,10 @@ if (C4::Context->preference('EnhancedMessagingPreferences')) { } $template->param( "show_guarantor" => ( $category_type =~ /A|I|S|X/ ) ? 0 : 1 ); # associate with step to know where you are + +# we should remove 'lang' from borrower data otherwise it overlays Template's lang variable: +delete $data{lang}; + $template->param(%data); $template->param( "step_$step" => 1) if $step; # associate with step to know where u are $template->param( step => $step ) if $step; # associate with step to know where u are --- a/members/paycollect.pl +++ a/members/paycollect.pl @@ -239,6 +239,9 @@ if ( $total_paid and $total_paid ne '0.00' ) { $total_paid = '0.00'; #TODO not right with pay_individual } +# we should remove 'lang' from borrower data otherwise it overlays Template's lang variable: +delete $borrower->{lang}; + $template->param(%$borrower); if ( $input->param('error_over') ) { --