[Framework-Team] Re: 3.0 bundle broken?

Hanno Schlichting plone at hannosch.info
Wed Nov 22 19:03:13 UTC 2006


Martin Aspeli wrote:
> On 11/22/06, Hanno Schlichting
>> This means we have two adapters registered for the exact same interface
>> combination which isn't possible and results in a
>> ConfigurationConflictError.
> So how do we normally deal with this? I would've thought it'd be
> possible to do more than one adapter on say, the portal root. Named
> adapters?

A named adapter was the easiest fix I could think of as well (besides
hard-coding the handler, which is so Zope2ish ;)) and so I changed the
code accordingly. By not using GS's importObjects I could also get rid
of two nasty monkey patches, so the code looks even saner now.

> The portlets import handler
> (http://svn.plone.org/svn/plone/plone.app.portlets/trunk/plone/app/portlets/exportimport/portlets.py)
> could just as well work on the portal root, but we'd obviously need
> some way of disambiguating here as well.
>> I'm not sure what the best way is to fix this problem properly :(
> Me neither. At least we know what the problem is now. It really is
> this call in the portlets import handler:
> importObjects(sm, '', context)
> which I presume does the adaptation of 'sm' to IBody, that needs to do
> some disambiguation. Perhaps we can sidestep importObjects() entirely?

Yep, it's not that much code in there anyways. I copied over a slightly
simplified and adjusted version.


More information about the Framework-Team mailing list