[Zope-dev] More information in case of ZCML conflict errors

Godefroid Chapelle gotcha at bubblenet.be
Wed Aug 10 08:03:54 EDT 2011


Le 02/08/11 15:29, Sylvain Viollon a écrit :
>
> Hello,
>
>     I spend a long time trying to understand why I could not override a
>     component in ZCML and debug the error.
>
>     First, includeOverrides doesn't include any overriding registration.
>     At least not like you would expect. At best It can be used to include a package
>     in the site.zcml that would conflict with an another, replacing the conflicting actions
>     by his own.
>
>     After I would love, when there is a conflict error in ZCML to have a bit more
>     of information other than what we currently have: like which file include which file
>     and so up to the conflicting actions. As I pdb through this conflict, I see that
>     all this information is already there, it is just not included in the exception nor
>     displayed to the user.
>
>     This information can be found in zope.configuration.config line 1517, in
>     the variable includepath and basepath. This just need to be added to the
>     exception.
>
>     Since I work with Zope and ZCML, having those informations to debug
>     conflict errors would have saved me days of works, at least.
>
>     My issue was that an another package was already including the package that contained
>     actions I wanted to override, so even if I wanted to include it myself in order to
>     override its actions, it would not be included since it already have been included.
>
>     Finally, I think a bit of documentation on ZCML conflict errors would help a lot
>     everybody.
>
>     Regards,
>
>     Sylvain,
>

I bumped recently on the exact same issue.

I totally agree with your statements.

I think it is really worth changing the message issued by the 
configuration conflict errors.

I hope I will be able to work on this in the coming weeks.

Sylvain, I'll let you know.
-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be



More information about the Zope-Dev mailing list