From: http://hendry.iki.fi/ Date: Wed, 21 Apr 2010 19:21:38 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 3.20100427~84^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9ed523d762afd74c3004a07fc8ee12daa9354813;p=ikiwiki.git --- diff --git a/doc/bugs/Comments_dissapeared.mdwn b/doc/bugs/Comments_dissapeared.mdwn index c7403f0f1..830c3519f 100644 --- a/doc/bugs/Comments_dissapeared.mdwn +++ b/doc/bugs/Comments_dissapeared.mdwn @@ -34,14 +34,28 @@ I have tried rebuilding on my squeeze system and still comments don't appear. An I was worried is was due to a time skew problem I was experiencing on my VPS in the last month, though the time is right now and still comments do not appear on blog posts like -# Getting closer +# Debugging templates - hendry@webconverger templates$ for i in *.tmpl; do ./test-template.perl $i || echo $i has an error; done - HTML::Template->new() : At least one or not terminated at end of file! at /usr/share/perl5/HTML/Template.pm line 2351. - page.tmpl has an error - hendry@webconverger templates$ cat test-template.perl +`sudo apt-get install libhtml-template-compiled-perl` + + hendry@webconverger templates$ cat test-template.perl #!/usr/bin/perl - use HTML::Template; - my $htc = HTML::Template->new(filename => "$ARGV[0]"); + use HTML::Template::Compiled; + local $HTML::Template::Compiled::DEBUG = 1; + my $htc = HTML::Template::Compiled->new( + filename => "$ARGV[0]", + ); + eval { + print $htc->output; + }; + if ($@) { + # reports as text + my $msg = $htc->debug_code; + # reports as a html table + my $msg_html = $htc->debug_code('html'); + } + hendry@webconverger templates$ ./test-template.perl page.tmpl + Missing closing tag for 'IF' atend of page.tmpl line 159 + I think the problem was before that it was `` and now it is `` ?