[zope2-tracker] [Bug 434422] Re: Endless loop with Acquisition and ILocation in Products.Five.component findSite

gweis gerhard.weis at gmail.com
Mon Sep 21 23:34:41 EDT 2009


** Attachment added: "suggested fix"
   http://launchpadlibrarian.net/32228080/aq-ilocation-fix.diff

** Description changed:

  Prodcuts.Five.component findSite using the ILocation API or if not
  available the Acquisition chain to find a parent object. If an object
  Acquisition wrapped object implements the ILocation API the parent
  retrieved from obj.__parent__ is aq-wrapped in the context of obj which
  leads to an endless loop in finding an ISite.
  
  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

-- 
Endless loop with Acquisition and ILocation in Products.Five.component findSite
https://bugs.launchpad.net/bugs/434422
You received this bug notification because you are a member of Zope 2
Developers, which is subscribed to Zope 2.


More information about the zope2-tracker mailing list