X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/df012e54c7bf5a8e8fb2cb3c2f8cbf8dc30686f9..9be3f951166e5d1256a806a8db25b7c5c7021acb:/IkiWiki/Plugin/template.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm index 52c482c38..ccc9cb666 100644 --- a/IkiWiki/Plugin/template.pm +++ b/IkiWiki/Plugin/template.pm @@ -41,20 +41,18 @@ sub preprocess (@) { blind_cache => 1); }; if ($@) { - error gettext("failed to process template:")." $@"; - } - if (! $template) { - error sprintf(gettext("%s not found"), + # gettext can clobber $@ + my $error = $@; + error sprintf(gettext("failed to process template %s"), htmllink($params{page}, $params{destpage}, - "/templates/$params{id}")) + "/templates/$params{id}"))." $error"; } $params{basename}=IkiWiki::basename($params{page}); foreach my $param (keys %params) { my $value=IkiWiki::preprocess($params{page}, $params{destpage}, - IkiWiki::filter($params{page}, $params{destpagea}, - $params{$param}), $scan); + $params{$param}, $scan); if ($template->query(name => $param)) { my $htmlvalue=IkiWiki::htmlize($params{page}, $params{destpage}, pagetype($pagesources{$params{page}}), @@ -69,8 +67,7 @@ sub preprocess (@) { } return IkiWiki::preprocess($params{page}, $params{destpage}, - IkiWiki::filter($params{page}, $params{destpage}, - $template->output), $scan); + $template->output, $scan); } 1