Wichert Akkerman wrote:
That is by design: the zope configuration magic can not determine to
which interface your adapter is adapting since it implements two
interfaces. You need to define that explicitly in zcml for adapters that
implement multiple interfaces.
thanks, Wichert; I made some changes on the installer and also on the
zcml and it's working now: http://dev.plone.org/collective/changeset/56772
I added the name of the interface provided:
def installExtenderGloballyIfLocallyIsNotSupported(extenderClass,
*provides*, name):
if not localAdaptersAreSupported:
from zope.component import provideAdapter
provideAdapter(extenderClass, provides=provides, name=name)
and both adapters in the zcml:
<adapter
for="Products.ATContentTypes.interface.IATNewsItem"
provides="archetypes.schemaextender.interfaces.ISchemaExtender"
factory=".extender.NITFExtender" />
<adapter
for="Products.ATContentTypes.interface.IATNewsItem"
provides="archetypes.schemaextender.interfaces.ISchemaModifier"
factory=".extender.NITFExtender" />
the strange thing is I added *only one* interface at install time and
it's working fine.
installExtenderGloballyIfLocallyIsNotSupported(NITFExtender,
*ISchemaExtender*, 'nitf4plone')
do I have to add *ISchemaModifier* in a second line?
saludos
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers