[Zope] Re: Fwd: Re: [Zope] R: [Zope] Invalid Header (0) error
Mark N. Gibson
mark@kaivo.com
Fri, 23 Jun 2000 10:48:27 -0600 (MDT)
We've had the same problem,
Michael Pelletier addressed this question in a previous post,
Check out:
http://www.egroups.com/message/zope/29589?&start=29498
To summarize, 'Zope doesn't like it if there is no html tags before the DTML
begins.'
To fix our problem, we simply make sure that a html comment as the first line
in every page, through the standard_html_header.
Hope this helps,
Mark
-----------
mark@kaivo.com
www.kaivo.com
>
> --- In zope@egroups.com, Richard Moon <richard@d...> wrote:
> Marcel, you're English is fine (better than my Italian).
>
> I think you are near to the answer.
>
> My dtml method 'dtml_main' has this kind of logic
>
> <dtml-if something>
> <dtml-var a_dtml_method>
> <dtml-else>
> <dtml-var another_dtml_method>
> </dtml-if>
>
> I had standard_html_header (which has an html header) in each of the
> 'inner' methods, but not in the 'dtml_main' method. So I took
> standard_html_header out of 'a_dtml_method' and 'another_dtml_method'
> and
> put it in the 'dtml_main' method. No Invalid Header problems now. I
> don't
> know why that should make a difference but it seems to.
>
> Thanks for your help
>
> Richard
>
>
> I found that the main dtml-method had no standard-header (so no html
> header) but the methods which it was rendering
>
> At 15:01 23/06/00 +0200, you wrote:
>
>
> > > Does anyone know what an Error Type: Value Error, Error
> Value:Invalid
> > > Header (0) error represents ?
> > >
> > > It's interesting in the way it shows itself up. I added a
> <dtml-var
> > > a_dtml_method> to a dtml method and it generates this error. This
> > <dtml-var
> > > a_dtml_method> is nested inside a <dtml-if> and would definitely
> not be
> > > rendered the first time the 'calling' dtml-method is rendered.
> > >
> > > I took out the <dtml-var a_dtml_method> and I still got the same
> error.
> > >
> > > I put a <dtml-var REQUEST> as the first line of the 'calling'
> method and
> > > everything then renders correctly with no error. Even the
> <dtml-var
> > > a_dtml_method> renders correctly when it should do so.
> > >
> > > Any ideas, suggestions ?
> > >
> >
> >This is very strange.
> >I had have the some problem.
> >I have seen that if the Zope generate a lot of empty lines at the
> begining
> >I receive this error.
> >
> >the idea is to dont have too many empty lines at the begining of the
> output,
> >(I have no idea how many)
> >
> >try to write something at the begining of the output doc.
> >I use someting like "Content-type:...."
> >
> >PM
> >PS: My English is not so good,
> >maybe you dont understood what I want to say
> >
> >
> >
> >_______________________________________________
> >Zope maillist - Zope@z...
> >http://lists.zope.org/mailman/listinfo/zope
> >** No cross posts or HTML encoding! **
> >(Related lists -
> > http://lists.zope.org/mailman/listinfo/zope-announce
> > http://lists.zope.org/mailman/listinfo/zope-dev )
>
>
> Richard Moon
> richard@d...
>
>
>
> _______________________________________________
> Zope maillist - Zope@z...
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
> --- End forwarded message ---
>
>