Re: release plone.app.contenttypes
Philip Bauer <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Fred, from a first glimse at the issue it seems plone.app.relationfield should make sure that the objects with relations implement z3c.relationfield.interfaces.IHasOutgoingRelations or the event-handler in z3c.relationfield also handles plone.app.relationfield.interfaces.IDexterityHasRelations. Can you please create a ticket to this effect in plone.app.relationfield? The main problem is that plone.app.relationfield does not have the relevant tests. Philip Am 17.09.2014 um 17:00 schrieb Fred van Dijk <f.van.dijk-1kr/[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 > _______________________________________________ > Plone-developers mailing list > Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/plone-developers ------------------------------------------------------------------------------ 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 _______________________________________________ Plone-developers mailing list Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/plone-developers
signature.asc
(application/pgp-signature, 496 B)
-----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUGpq0AAoJEOeXgSbn9GtJLA4H/jcu8IgSt9FgDBR2S9dQ7gh2 9SyWxGTEqoiXxHafPBwTXlTEhTJtJ0ydBLy+N8L4bkL6xqNCmHbLWdklYzNSrphe EJad2jcFVSh+Hhh+H8ysymQKNA7gly6NfksvtN2GgVJ7WyvAvjQydsn/wJG5kURe 18HSb81BPXlSwdpLm8JetBBrPaZZLS6MvRSbUa1GZ0cAwWXu2Kp7O0VGijpQRQRh OOQuOXtxcO6ANrSXIs16J0M3GaNbG9z0tO5rErGKMUZ+CXUJdfWWy8bJ82w0S/EZ OHOGMOrly1iQAxUsuPCooucMgzEluPilsjQYuwelYVfu+N3dUn3xXXvaUyBONz4= =stuE -----END PGP SIGNATURE-----