# a static page
return -1 unless @{ $r->{objects} || [] };
+ my $template_error = $r->{error};
$r->{error} = <<EOF;
-<H1> Template not found </H1>
+<h1> Template not found </h1>
-This template was not found while processing the following request:
+A template was not found while processing the following request:
-<B>@{[$r->{action}]}</B> on table <B>@{[ $r->{table} ]}</B> with objects:
+<strong>@{[$r->{action}]}</strong> on table
+<strong>@{[ $r->{table} ]}</strong> with objects:
-<PRE>
+<pre>
@{[join "\n", @{$r->{objects}}]}
-</PRE>
+</pre>
-Looking for template <B>@{[$r->{template}]}</B> in paths:
-<PRE>
+The main template is <strong>@{[$r->{template}]}</strong>.
+The template subsystem's error message was
+<pre>
+$template_error
+</pre>
+We looked in paths:
+
+<pre>
@{[ join "\n", $self->paths($r) ]}
-</PRE>
+</pre>
EOF
$r->{content_type} = "text/html";
$r->{output} = $r->{error};