[Zope-CMF] Five:traversable and PortalContent

Brent Hendricks brent.hendricks at gmail.com
Tue Nov 29 15:37:39 EST 2005


When goldegg was first started, plone had a line like this in configure.zcml:

  <five:traversable
      class="Products.CMFCore.PortalContent.PortalContent"
      />

I've noticed that this line causes failures in the CMFCore tests so
I'm taking it out of plone.  If it's necessary it should probably go
in CMFCore anyway, but I'm puzzled by the test failures.  On the trunk
are you marking PortalContent traversable in some other way?

Here's an example:

ERROR: test_Condition_PathExpression
(CMFCore.tests.test_ActionInformation.ActionInformationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/instances/cmf1.6/Products/CMFCore/tests/test_ActionInformation.py",
line 312, in test_Condition_PathExpression
    self.failUnless(ai.testCondition(ec))
  File "/opt/instances/cmf1.6/Products/CMFCore/ActionInformation.py",
line 236, in testCondition
    return bool( self.condition(ec) )
  File "/opt/instances/cmf1.6/Products/CMFCore/Expression.py", line
44, in __call__
    res = compiled(econtext)
  File "/opt/Zope-2.8/lib/python/Products/PageTemplates/Expressions.py",
line 185, in __call__
    return self._eval(econtext)
  File "/opt/Zope-2.8/lib/python/Products/PageTemplates/Expressions.py",
line 173, in _eval
    ob = self._subexprs[-1](econtext)
  File "/opt/Zope-2.8/lib/python/Products/PageTemplates/Expressions.py",
line 127, in _eval
    ob = restrictedTraverse(ob, path, getSecurityManager())
  File "/opt/Zope-2.8/lib/python/Products/PageTemplates/Expressions.py",
line 286, in restrictedTraverse
    o=t(REQUEST, name)
  File "/opt/instances/goldegg/Products/Five/traversable.py", line 58,
in __fallback_traverse__
    raise AttributeError, name
AttributeError: test_script


More information about the Zope-CMF mailing list