Comment 6 for bug 143765

Revision history for this message
Philipp von Weitershausen (philikon) wrote : Re: [Bug 143765] Re: IPublishTraverse that is part of a view not being invoked

On 18 Apr 2008, at 14:11 , Bertrand Mathieu wrote:
> Got it with zope 2.10.5. The culprit is Five metaconfigure.I have
> made a
> patch with tests, but the error seems obvious: just compare
> Products/Five/browser/metaconfigure.py and
> zope/app/publisher/browser/viewmeta.py. The code in Five seems to be
> an
> old copy/paste.
>
> In short: the view class is wrapped by Five. If it has a
> 'publishTraverse' method it should be called by the wrapper. But the
> code get the method with:
> class_.publishTraverse.__get__(self).__of__(self) => __of__ on a
> method?! The code in zope.app is the same without __of__
> I guess there is a try/except somewhere that hides this error.

This code is indeed strange. Your observations seem to be correct.
However, it would be good to see how you tested this...

> The patch is made against
> svn://svn.zope.org/repos/main/Products.Five/branches/1.5 at rev80401.

Thanks for the patch. It seems to be missing the 'view.txt' file,
though, which contains the test. This is the interesting bit :).