[Zope] Custom tpValues for dtml-tree

Dieter Maurer dieter@handshake.de
Sun, 3 Dec 2000 10:19:16 +0100 (CET)


Randall Kern writes:
 > ....
 > Error Type: AttributeError
 > Error Value: 'tuple' object has no attribute 'append'
 > ....
 >   File /usr/src/Zope-2.2.2-src/lib/python/TreeDisplay/TreeTag.py, line 566,
 > in apply_diff
 >     (Info: ([None, ([140975456, []],)], [140974880, 140974088]))
 > AttributeError: (see above)

You may try to replace in "TreeDisplay.TreeTag.TreeTag.tpRender":

    if state is substate and not (args.has_key('single') and args['single']):
        state=state or ([id],)
        state=encode_seq(state)
by:
    if state is substate and not (args.has_key('single') and args['single']):
        state=state or [[id],]
        state=encode_seq(state)


If you do and have success, please file a bug report with patch
into the collector.


You may later get a different problem:

  In some contexts, the Zope security policy requires
  an acquisition context. You "Foo" objects do not
  have such contexts.

If the problem shows up, you will get Unauthorized exceptions
where you do not expect them.


Dieter