[Zope] Invalid Header (0) error

2000-06-23 Thread Richard Moon

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 ?

I'm running Zope 2.1.6 on RedHat Linux

Thanks

Richard


Richard Moon
[EMAIL PROTECTED]



___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] R: [Zope] Invalid Header (0) error

2000-06-23 Thread Marcel Preda



 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  -  [EMAIL PROTECTED]
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 )




Re: [Zope] R: [Zope] Invalid Header (0) error

2000-06-23 Thread Richard Moon

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  -  [EMAIL PROTECTED]
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
[EMAIL PROTECTED]



___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Re: Fwd: Re: [Zope] R: [Zope] Invalid Header (0) error

2000-06-23 Thread Mark N. Gibson

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
---
[EMAIL PROTECTED]
www.kaivo.com 

 
 --- In [EMAIL PROTECTED], Richard Moon [EMAIL PROTECTED] 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  -  [EMAIL PROTECTED]
 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
 [EMAIL PROTECTED]
 
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 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 ---
 
 


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] R: [Zope] Invalid Header (0) error

2000-06-23 Thread Dieter Maurer

Richard Moon writes:
  I think you are near to the answer.
  
  ... sevaral blank lines at start of rendered page ...

Zope wants to add a BASENAME URL in the HTML HEAD.
Therefore, it looks for an HTML header. Obviously, it
gives up with "Invalid Header", when is can not find
it near the very start of the page.

The relevant code is probably in "ZPublisher.HTTPResponse",
maybe "ZPublisher.HTTPRequest".


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
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 )