diff --git a/C4/Letters.pm b/C4/Letters.pm index cd764a132c..be042f5902 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -1913,9 +1913,14 @@ sub _process_tt { my $use_template_cache = C4::Context->config('template_cache_dir') && defined $ENV{GATEWAY_INTERFACE}; my $template = Template->new( { - EVAL_PERL => 0, - ABSOLUTE => 0, - RELATIVE => 0, + EVAL_PERL => 0, + ABSOLUTE => 0, + RELATIVE => 0, + PLUGINS => { + cgi => 'Koha::Template::Plugin::noop', + directory => 'Koha::Template::Plugin::noop', + file => 'Koha::Template::Plugin::noop', + }, PLUGIN_BASE => 'Koha::Template::Plugin', COMPILE_EXT => $use_template_cache ? '.ttc' : '', COMPILE_DIR => $use_template_cache ? C4::Context->config('template_cache_dir') : '', diff --git a/Koha/Template/Plugin/noop.pm b/Koha/Template/Plugin/noop.pm new file mode 100644 index 0000000000..ab9f012bf8 --- /dev/null +++ b/Koha/Template/Plugin/noop.pm @@ -0,0 +1,7 @@ +package Koha::Template::Plugin::noop; + +use Modern::Perl; + +use base qw( Template::Plugin ); + +1; diff --git a/Koha/TemplateUtils.pm b/Koha/TemplateUtils.pm index 84b693fe82..2ddf98d0a9 100644 --- a/Koha/TemplateUtils.pm +++ b/Koha/TemplateUtils.pm @@ -58,9 +58,14 @@ sub process_tt { my $tt = Template->new( { - EVAL_PERL => 0, - ABSOLUTE => 0, - RELATIVE => 0, + EVAL_PERL => 0, + ABSOLUTE => 0, + RELATIVE => 0, + PLUGINS => { + cgi => 'Koha::Template::Plugin::noop', + directory => 'Koha::Template::Plugin::noop', + file => 'Koha::Template::Plugin::noop', + }, PLUGIN_BASE => 'Koha::Template::Plugin', COMPILE_EXT => $use_template_cache ? '.ttc' : '', COMPILE_DIR => $use_template_cache ? C4::Context->config('template_cache_dir') : '',