Hi,

I have the following problem: I want to provide a custom
implementation for the following adapter:

    <adapter
        for="zope.publisher.interfaces.http.IHTTPRequest"
        provides="zope.i18n.interfaces.IUserPreferredLanguages"
        factory="Products.Five.i18n.PTSLanguages"
        />

This ZCML snippet can be found in Products/CMFPlone/overrides.zcml. I
believe it overrides the original adapter registered in
`Products/Five/i18n.zcml`.

I created a package called `my.package`, added a `browser.py` file
with the adapter class and an `overrides.zcml` containing the adapter
registration. Then I added a ZCML slug to my `etc/package-includes`
called `my.package-overrides.zcml`, containing the line:

<include package="my.package" file="overrides.zcml" />

When I start my Zope instance I get the following error:

zope.configuration.config.ConfigurationConflictError: Conflicting
configuration actions
  For: ('adapter', (<InterfaceClass
zope.publisher.interfaces.http.IHTTPRequest>,), <InterfaceClass
zope.i18n.interfaces.IUserPreferredLanguages>, '')
    File "/home/rafaelb/[snipped]/lib/python/my/package/overrides.zcml",
line 3.2-7.4
        <adapter
            for="zope.publisher.interfaces.http.IHTTPRequest"
            provides="zope.i18n.interfaces.IUserPreferredLanguages"
            factory="my.package.ModifiedPreferredLanguages"
        />
    File "/home/rafaelb/[snipped]/buildout/parts/plone/CMFPlone/overrides.zcml",
line 6.4-10.10
          <adapter
              for="zope.publisher.interfaces.http.IHTTPRequest"
              provides="zope.i18n.interfaces.IUserPreferredLanguages"
              factory="Products.Five.i18n.PTSLanguages"
              />

What am I doing wrong ?

Regards,

-- 
Rafael Bruno Cavalhero de Oliveira <[EMAIL PROTECTED]>
Analista de Sistemas - Paradigma <http://www.paradigma.com.br>
Mestrando em Ciência da Informação - UFMG
http://rafaelb.objectis.net

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to