[Zope] Strange error

julian@zereau.net julian@zereau.net
Wed, 24 Feb 1999 11:04:52 -0000 (GMT)


I have a strange problem with the following DTML snippet:

<!--#in map_type_to_mode-->
<!--#if "mode == 'a'" -->
  <!--#var "_['search_a']"-->
<!--#elif "mode == 'm'" -->
  <p>Mode M unsupported</p>
<!--#/if-->
<!--#/in-->

(map_type_to_mode is a query using "type" and returning one or no results in
"mode")

If the result is "m" it works perfectly, if the result is "a" and the target
page is not a search form, it works. If the target page is a search form, it
fails with a traceback:

Invalid Header (0): 

Traceback (innermost last):
  File /tmp/Zope-rootdir/usr/lib/python1.5/ZPublisher/Publish.py, line 879, in
publish_module
  File /tmp/Zope-rootdir/usr/lib/python1.5/ZPublisher/Publish.py, line 595, in
publish
    (Info: /cabletrack/action)
  File /tmp/Zope-rootdir/usr/lib/python1.5/OFS/Document.py, line 184, in
__call__
    (Object: action)
  File /tmp/Zope-rootdir/usr/lib/python1.5/OFS/Document.py, line 395, in
decapitate
ValueError: (see above)

---
Julian Morrison
Programmer (Zereau Ltd)