Re: release plone.app.contenttypes

Fred van Dijk <f.van.dijk-1kr/[email protected]>
Newsgroups gmane.comp.web.zope.plone.devel
Message-ID <[email protected]>
Hi,

> so by no means perfect, but good enough for mere mortals to start
> playing with and discover real-user bugs like the above.

To chime in with such a real-user bug as mere mortal, related items are AFAICS
broken in plone.app.contenttypes implementations, both in Plone 4.3.x with
p.a.c 1.1bX  as well as in Plone 5 coredev.  Specifically what is broken is that if
you create a related item from contentitem 1 to content item 2 and then remove
content item 2, the relation is not cleaned up and iterating over the relations in
content item 1 breaks.

We stumbled upon this when creating a custom content type with relations
 using plone.app.relationfield. The problem doesn't occur with Archetypes
based relations. There are event subscriptions in z3c.relationfield for
IObjectRemovedEvent and IObjectModifiedEvent to clean up relations and they
work for Archetypes CT's (like using the default related items functionality in
Plone 4.3.X)  but not with Dexterity CT's as in p.a.contenttypes.  

The quick fix for my custom CT is to iterate over all relations and to filter those out
with r.isBroken() : [r for r in self.context.related_articles if not r.isBroken()] and I use
those in views.

But I have no clue on where to report this. Is it an issue in p.a.contenttypes,
p.a.relationfield, z3c.relationfield, Dexterity or maybe is it an issue that the related items
are put on the default CT's in p.a.contenttypees as a behaviour and that the CT is
missing marker interfaces that z3c.relationfield is checking for? 

With kind regards,

Fred van Dijk

--
Zest - www.zestsoftware.nl
Vasteland 78
3011 BN Rotterdam
Tel: +31 (0)10 2959251


------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.