[Zope] Help needed: why is this DTML not working in zope 2 ?

Shane Hathaway shane@digicool.com
Tue, 04 Jul 2000 08:40:45 -0400


Hello Gilles,

I think you've been bitten by a recently solved bug in dtml-try.  When
2.2.0b4 comes out, please download it and try it out with your DTML (or
if you're in a hurry, download from CVS.)  If 2.2.0b4 doesn't solve it,
e-mail me right away.

Shane

Gilles Lavaux wrote:
> 
> Hello,
> 
> I am a little bit disappointed not getting any echo from my previous
> question, so I report it.
> Maybe my dtml is wrong for zope2, but I would appreciate to have some
> explanation from more experienced peoples.
> If I can not find a solution, we will have to keep our zope1 production
> server, and it will be the end of the Zope story in my company :-(
> 
> So my question was :
> 
> I want to display the content of a site starting from a folder called 'Site'
> with a tree tag.
> I want also to render immediately inside the tree the documents with an
> ID=='PUBLIC_Doc'.
> In Zope 1.x I have a working dtml method like this:
> 
> <!--#var standard_html_header-->
> <!--#tree Site branches_expr="objectValues()" sort=id skip_unauthorized-->
>   <b><!--#var id--></b>
>   <!--#if "_['id']=='PUBLIC_Doc'"-->
>     ##
>     <!--#try-->
>       <!--#var "_[_['id']]"-->
>     <!--#except-->
>       <!--#var Except_Message-->
>     <!--#/try-->
>     ##
>   <!--#/if-->
> <!--#/tree-->
> <!--#var standard_html_footer-->
> 
> Unfortunatly for me , with zope 2.1.6 i get an error when I try to render
> the 'PUBLIC_Doc' document:
> .....
> PUBLIC_Doc !#
> Error type:AttributeError
> Error Message:
> Error Message:__call__
> Error TB:Traceback (innermost last): File
> "/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Try.py", line 221, in
> render_try_except result = render_blocks(self.section, md) File
> "/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Util.py", line 335, in
> eval return eval(code,globals,d) File "", line 0, in ? File
> "/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Util.py", line 161, in
> careful_getitem v=mapping[key] File
> "/usr/share/zope/lib/python/OFS/DTMLMethod.py", line 146, in __call__
> r=apply(HTML.__call__, (self, client, REQUEST), kw) File
> "/usr/lib/python1.5/site-packages/DocumentTemplate/DT_String.py", line 502,
> in __call__ try: return render_blocks(self._v_blocks, md) AttributeError:
> __call__
> 
> has someone a solution ??
> 
> Thanks,
> 
> Gilles
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> 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 )