plone/plone.app.discussion — pull request #11 by gaudenz (2012-09-17 14:54:59+00:00)
Title: Fix catalog updates for IObjectMovedEvent

If comments were moved because an object on a higher level than the
commented object was moved, these comments were wrongly reindexed.
The commented object also got a wrong __parent__ pointer.

This fixes https://dev.plone.org/ticket/13172.

@tisto I also included a test to verify the fix. All tests pass with this fix, but I'm a bit unsure to directly merge this to master because I don't understand why the __parent__ pointer modification was done in the first place. This also removes the unwrapping of the comment object. Without a acquisition wrapper getPhysicalPath does not work and the object is catalogued with the wrong id. I guess the __parent__ pointer modification was an attempt to fix this.