The situation is very simple. I have a fresh instance of zope3.
when I try to add a ZPT Page through ZMI and enter the following html for the source:

<html metal:use-macro="context/@@standard_macros/page">
   <div metal:fill-slot="body">bla bla bla</div>

No error will occur during the adding of the ZPT Page. However, when I try to view the ZPT Page as an "Unauthenticated User" or another PAU principal, I will get the error which I added the traceback to the end of my post. It basically complains that it cannot traverse to the 'title' attribute of the principal! Now, I don't get the error If I view the ZPT Page as a ZCML "Manager" .

It is very easy to try it yourself and see the error! I would appreciate any help. thanks alot in advance. Hass

Here is the traceback:

File "/usr/local/Zope-3.3.0/lib/python/zope/tales/", line 704, in evaluateText
   text = self.evaluate(expr)
File "/usr/local/Zope-3.3.0/lib/python/zope/tales/", line 696, in evaluate
   return expression(self)
- /usr/local/Zope-3.3.0/lib/python/zope/app/rotterdam/
  - Line 50, Column 36
  - Expression: <PathExpr standard:u'request/principal/title'>
  - Names:
     {'args': (),
      'container': < object at 0xb6e3242c>,
      'context': < object at 0xb6e3242c>,
      'default': <object object at 0xb7d95568>,
      'loop': {},
      'nothing': None,
      'options': {},
      'repeat': {},
'request': <zope.publisher.browser.BrowserRequest instance URL=>,
      'template': < object at 0xb5365aac>,
'usage': <zope.pagetemplate.pagetemplate.TemplateUsage object at 0xb4ee2d6c>} File "/usr/local/Zope-3.3.0/lib/python/zope/tales/", line 217, in __call__
   return self._eval(econtext)
File "/usr/local/Zope-3.3.0/lib/python/zope/tales/", line 194, in _eval
   ob = self._subexprs[-1](econtext)
File "/usr/local/Zope-3.3.0/lib/python/zope/tales/", line 124, in _eval
   ob = self._traverser(ob, element, econtext)
File "/usr/local/Zope-3.3.0/lib/python/zope/app/pagetemplate/", line 68, in __call__
File "/usr/local/Zope-3.3.0/lib/python/zope/traversing/", line 164, in traversePathElement
   return traversable.traverse(nm, further_path)
- __traceback_info__: (< object at 0xb6a42dac>, 'title') File "/usr/local/Zope-3.3.0/lib/python/zope/traversing/", line 52, in traverse
   raise TraversalError(subject, name)
- __traceback_info__: (< object at 0xb6a42dac>, 'title', []) TraversalError: (< object at 0xb6a42dac>, 'title')

Maciej Wisniowski wrote:
I have the same problem. I just know the problem is with the
principal_info macro and it only occurs when one is logged in with a PAU
principal (ZCML principals do fine as far as I remember).
'same problem' is not enough I think. What is the traceback etc?

Zope3-users mailing list

Reply via email to