[Zope3-dev] Recent changes in Zope 3

Marius Gedminas mgedmin at b4net.lt
Mon Sep 20 06:40:19 EDT 2004


Something changed in Zope 3 recently, perhaps as a side effect of
Stephan's Presentation service removal.

I have several page templates that refer to view/macros/page.  The view
class has a property 'macros' that returns the macros attribute of a
different page template.  This used to work last week.  Today, after svn
up, I get the following message instead:

  <...snip...>
  Template "ivija/threesixty/browser/templates/index.pt", line 3, column 0
    <html metal:use-macro="view/macros/page">
  Expression: <PathExpr standard:'view/macros/page'>
  File "zope/tales/expressions.py", line 204, in __call__
    return self._eval(econtext)
  File "zope/tales/expressions.py", line 191, in _eval
    ob = self._subexprs[-1](econtext)
  File "zope/tales/expressions.py", line 123, in _eval
    ob = self._traverser(ob, element, econtext)
  File "zope/app/pagetemplate/engine.py", line 72, in trustedZopeTraverser
    request=getattr(econtext, 'request', None))
  File "zope/app/traversing/adapters.py", line 114, in traverse
    curr = traversePathElement(curr, name, path, request=request)
  File "zope/app/traversing/adapters.py", line 167, in traversePathElement
    next_item = traversable.traverse(nm, further_path)
  File "zope/app/traversing/adapters.py", line 50, in traverse
    return subject[name]
  Extra information: (<zope.app.pagetemplate.simpleviewclass.SimpleViewClass from /home/mg/Zope3/src/ivija/threesixty/browser/templates/index.pt object at 0x41c068ec>, 'macros', ['page'])
  File "zope/app/pagetemplate/simpleviewclass.py", line 42, in __getitem__
    return self.index.macros[name]
  KeyError: 'macros'

It seems that view attributes are no longer accessible via TALES path
expressions.  I suspect this is due to additional security wrapping or
something like that.

Marius Gedminas
-- 
Cheap, Fast, Good -- pick two.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20040920/e4be11dc/attachment.bin


More information about the Zope3-dev mailing list