[Zope] Strange Tree Error

Martijn Pieters mj@antraciet.nl
Thu, 09 Sep 1999 10:03:46 +0200


At 20:55 08/09/99 , John Goerzen wrote:
>I still have no idea about this one.  I just thought I'd add that I am
>using Zope 2 and that my other trees behave fine, and that this one
>behaves fine except for Expand All.  Ideas welcome! :-)
>
>John Goerzen <jgoerzen@complete.org> writes:
>
> > Hi,
> >
> > I have a tree set up for use as my site map.  I wanted to add Expand
> > All and Collapse All features, which are no problem to add; the
> > documentation covers them quite nicely.  My Collapse All button works
> > fine.  The tree works fine, too, and everything can be expanded.
> > However, the Expand All link doesn't work; it gives an error:
> >
> > Error Type: KeyError
> >              Error Value: branches
> >
> > And claims that something is referencing the non-existant branches.
> >
> > Here is my code.  Any suggestions welcome!
> >
> > <A HREF="<dtml-var id>?expand_all=1">Expand All</A> |
> > <A HREF="<dtml-var id>?collapse_all=1">Collapse All</A>
> > <P>
> > <!--#tree
> >   expr="PARENTS[0]"
> >   skip_unauthorized=1 sort=title_or_id
> >   branches_expr="objectValues(['Folder', 'DTML Document'])"
> >   -->
> > <dtml-if "id == 'acl_users'">
> >   <!--Skipping <dtml-var id> -->
> > <dtml-else>
> >   <A HREF="<!--#var absolute_url-->"><!--#var title_or_id--></A>
> > </dtml-if>
> > <!--#/tree-->

Hmmm. I bet those other trees use the 'branches' attribute.

This is a bug. File it at http://www.zope.org/Collector/

I'd fix it if I could get my head round this piece of code.. it looks like 
a serious rewrite is needed to fix this one..


--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------