[Zope-dev] exception views lost context on Zope 2.12

Andreas Zeidler az at zitc.de
Wed Feb 24 08:01:12 EST 2010


On 23.02.10 13:36, Wichert Akkerman wrote:
> On 2/23/10 13:22 , Martin Aspeli wrote:
>> Wichert Akkerman wrote:
>>> It is not useful, it is critical. Without the context you can not use
>>> any browser views for example.
>>
>> Well, the use cases that have been to date have done without it. :) I'm
>> not disagreeing with you, I'm just saying we need to make sure we don't
>> break existing use cases (plone.app.linkintegrity, plone.caching to name
>> two that I know of).
> 
> As I said plone.app.linkintegrity always used this trick in Zope 2.10, 
> so it is not something I just came up with. It is known to work :)

wichert is right, the existing use cases — or say, at least
p.a.linkintegrity — have _not_ done without it.  in fact, the
confirmation view (i.e. "you really wanna delete this?") relies on the
(acquisition) context.  otherwise it could never be rendered as
something that looks like a "regular" page.

however, the monkey patch used here is only partly applied for zope
2.12, and the bit where the view gets aq-wrapped is not[*].  since it
remains to work, though, i suspect that wichert's problem could be
something else...


andi

[*] see
http://dev.plone.org/plone/browser/plone.app.linkintegrity/trunk/plone/app/linkintegrity/monkey.py#L18

-- 
zeidler it consulting - http://zitc.de/ - info at zitc.de
friedelstraße 31 - 12047 berlin - telefon +49 30 25563779
pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/
plone 4.0 alpha released! -- http://plone.org/products/plone/



More information about the Zope-Dev mailing list