X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/9f401d6617a11efcedda1c956b2ccea061a7540f..4eeeed1b6ec99d180b556ea7a6a8a30c9657a0fd:/IkiWiki/Plugin/template.pm

diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm
index b8c2f05b2..3df06e652 100644
--- a/IkiWiki/Plugin/template.pm
+++ b/IkiWiki/Plugin/template.pm
@@ -41,20 +41,16 @@ sub preprocess (@) {
 			blind_cache => 1);
 	};
 	if ($@) {
-		error gettext("failed to process template:")." $@";
-	}
-	if (! $template) {
-		error sprintf(gettext("%s not found"),
+		error sprintf(gettext("failed to process template %s"),
 			htmllink($params{page}, $params{destpage},
-				"/templates/$params{id}"))
+				"/templates/$params{id}"))." $@";
 	}
 
 	$params{basename}=IkiWiki::basename($params{page});
 
 	foreach my $param (keys %params) {
 		my $value=IkiWiki::preprocess($params{page}, $params{destpage},
-		          IkiWiki::filter($params{page}, $params{destpage},
-		          $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 +65,7 @@ sub preprocess (@) {
 	}
 
 	return IkiWiki::preprocess($params{page}, $params{destpage},
-	       IkiWiki::filter($params{page}, $params{destpage},
-	       $template->output), $scan);
+	       $template->output, $scan);
 }
 
 1