plonezopezope3

Can zope.publisher.browser.BrowserView be used in Plone?


Given that Products.Five is an integration layer to make the Zope Component Architecture (ZCA) usable in Plone:

The former produces a traceback:

2015-06-04 14:47:02 ERROR Zope.SiteErrorLog 1433443622.720.549321919726 http://localhost:8080/Plone/@@hello Traceback (innermost last): Module ZPublisher.Publish, line 138, in publish Module ZPublisher.mapply, line 77, in mapply Module ZPublisher.Publish, line 48, in call_object Module zope.publisher.browser, line 968, in __call__ NotImplementedError: Subclasses should override __call__ to provide a response body

Whereas the latter "just works"


Solution

  • You need to use Products.Five.browser.BrowserView because it is in charge of plugging the view in Acquisition, hence (among others) in Zope 2 security infrastructure.

    It inherits from AcquisitionBBB.

    Zope 2 security relies on acquisition to configure permissions only at root of content trees.