This failure occurs in a very specific situation: when accessing a view's method directly via its URL, eg.: http://127.0.0.1:8080/Plone/@@my-view/my_method
In order to get the context of the raised error the events.handleTraceback() method gets the aq_parent of the error_log object, which is the current "published" object in Zope-speak. When accessing a view normally, i.e http://127.0.0.1:8080/Plone/@@my-view, the published object is the context of the view (the Plone site root in the given example).
However, when accessing the method of a view the published object is the view itself (@@my-view in the example). In this case collective.logbook fails because the view instance is not pickable.
This failure occurs in a very specific situation: when accessing a view's method directly via its URL, eg.:
http://127.0.0.1:8080/Plone/@@my-view/my_method
In order to get the context of the raised error the
events.handleTraceback()
method gets theaq_parent
of theerror_log
object, which is the current "published" object in Zope-speak. When accessing a view normally, i.ehttp://127.0.0.1:8080/Plone/@@my-view
, the published object is the context of the view (the Plone site root in the given example).However, when accessing the method of a view the published object is the view itself (
@@my-view
in the example). In this casecollective.logbook
fails because the view instance is not pickable.