Thread: [htmltmpl] .tmpl page not rendering on screen
Brought to you by:
samtregar
From: Brad C. <bra...@hi...> - 2004-11-09 20:25:55
|
Hello folks, I've been using HTML::Template a thousand times over the past year and never had a page just not output. http://www.cicsnorthtown.org/cgi-bin/facultyadmin.pl?funct=menu Check the source code and note it just renders "<html><body></body></html>" If I try: http://www.cicsnorthtown.org/admin/menu.tmpl the page looks fine. or, in my Perl if I substitute at different file, like "test.tmpl" it works great. Perl: use HTML::Template; my $template; $template = HTML::Template->new(filename => '../admin/menu.tmpl'); $template -> param(facultylist=> $teacherdata ); print "Content-type: text/html\n\n"; print $template->output(); H::T is not returning any errors. Could it be a corrupt .tmpl file? If so, how would I know? Thanks. |
From: Timm M. <tm...@ag...> - 2004-11-09 20:34:18
|
At 02:25 PM 11/9/2004, Brad Cathey wrote: >Hello folks, > >I've been using HTML::Template a thousand times over the past year and never >had a page just not output. > >http://www.cicsnorthtown.org/cgi-bin/facultyadmin.pl?funct=menu > >Check the source code and note it just renders "<html><body></body></html>" <snip> Actually, it outputs nothing at all. I bet you're using a Mozilla-based browser. Mozilla puts in those HTML tags automatically when you view the source on an empty text/html document. |
From: Clifton R. <cli...@ti...> - 2004-11-09 20:47:48
|
On Tue, Nov 09, 2004 at 02:25:44PM -0600, Brad Cathey wrote: > Hello folks, > > I've been using HTML::Template a thousand times over the past year and never > had a page just not output. > > http://www.cicsnorthtown.org/cgi-bin/facultyadmin.pl?funct=menu > > Check the source code and note it just renders "<html><body></body></html>" > > If I try: http://www.cicsnorthtown.org/admin/menu.tmpl the page looks fine. > > or, in my Perl if I substitute at different file, like "test.tmpl" it works > great. > > > Perl: > > use HTML::Template; > > my $template; > > $template = HTML::Template->new(filename => '../admin/menu.tmpl'); > $template -> param(facultylist=> $teacherdata ); > > print "Content-type: text/html\n\n"; > print $template->output(); > > H::T is not returning any errors. Could it be a corrupt .tmpl file? If so, > how would I know? My guess is you are getting some kind of fatal Perl error in the one invocation instance. Try adding: use CGI; use CGI::Carp 'fatalsToBrowser'; at the head of the program and see if you get any output with this. (This should send your Perl error messages to the browser, unless things are so messed up that Perl itself can't load.) -- Clifton -- Clifton Royston -- cli...@ti... Tiki Technologies Lead Programmer/Software Architect Did you ever fly a kite in bed? Did you ever walk with ten cats on your head? Did you ever milk this kind of cow? Well we can do it. We know how. If you never did, you should. These things are fun, and fun is good. -- Dr. Seuss |
From: Brad C. <bra...@hi...> - 2004-11-09 21:44:59
|
> On Tue, Nov 09, 2004 at 02:25:44PM -0600, Brad Cathey wrote: >> Hello folks, >> >> I've been using HTML::Template a thousand times over the past year and never >> had a page just not output. >> >> http://www.cicsnorthtown.org/cgi-bin/facultyadmin.pl?funct=menu >> >> Check the source code and note it just renders "<html><body></body></html>" >> >> If I try: http://www.cicsnorthtown.org/admin/menu.tmpl the page looks fine. >> >> or, in my Perl if I substitute at different file, like "test.tmpl" it works >> great. >> >> >> Perl: >> >> use HTML::Template; >> >> my $template; >> >> $template = HTML::Template->new(filename => '../admin/menu.tmpl'); >> $template -> param(facultylist=> $teacherdata ); >> >> print "Content-type: text/html\n\n"; >> print $template->output(); >> >> H::T is not returning any errors. Could it be a corrupt .tmpl file? If so, >> how would I know? > > My guess is you are getting some kind of fatal Perl error in the one > invocation instance. Try adding: > > use CGI; > use CGI::Carp 'fatalsToBrowser'; > > at the head of the program and see if you get any output with this. > (This should send your Perl error messages to the browser, unless > things are so messed up that Perl itself can't load.) > -- Clifton Thanks Clifton, but I have all that debugging stuff in place. In fact, when I use Data::Dumper I it renders the page along with the hash. I'd do a hex dump, but I have no idea what I'm looking for. Maybe I should start rebuilding the .tmpl file line by line and see where it breaks. BRad |
From: Offer K. <off...@gm...> - 2004-11-09 22:53:12
|
On Tue, 09 Nov 2004 14:25:44 -0600, Brad Cathey wrote: > > Perl: > > use HTML::Template; > > my $template; > > $template = HTML::Template->new(filename => '../admin/menu.tmpl'); > $template -> param(facultylist=> $teacherdata ); > Try setting die_on_bad_params to 0 and see what happens, e.g.: $template = HTML::Template->new( filename => '../admin/menu.tmpl', die_on_bad_params => 0, ); -- Offer Kaye |
From: Sam T. <sa...@tr...> - 2004-11-10 01:53:46
|
On Tue, 9 Nov 2004, Brad Cathey wrote: > H::T is not returning any errors. Could it be a corrupt .tmpl file? If so, > how would I know? What happens when you run it from the command-line? -sam |
From: Kevin S. <kev...@gm...> - 2004-11-10 04:49:45
|
On Tue, 09 Nov 2004 14:25:44 -0600, Brad Cathey <bra...@hi...> wrote: > H::T is not returning any errors. Could it be a corrupt .tmpl file? If so, > how would I know? When you say that H::T is not returning any errors are you looking in Apache's error_log to verify? -- Kev. |