Endless loop with Acquisition and ILocation in Products.Five.component findSite
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Prodcuts.
The attached patches contain a doc-test to demonstrate the behaviour and a suggested fix. The fix just checks if the object is aq-wrapped before accessing the __parent__ attribute. This basically means, Acquisition is given preference to ILocation.
The patch against current Zope 2.11 development branch, and most likely applies to 2.10 too. I am not sure about 2.12 because there have been some changes to the Acquisition module.
cheers
Gerhard
tags: | added: bug+solution |
In Zope 2.12 Acquisition has been made aware of __parent__pointers and the code ling in findSite only uses aq_parent, which does the correct thing internally.