[Zope-CMF] Making GenericSetup property import less strict

Wichert Akkerman wichert at wiggy.net
Tue Feb 16 05:37:18 EST 2010


I am running into an interesting problem: it appears to be impossible to 
write a FTI that works in both CMF 2.1 and 2.2. The problem are content 
icons: CMF 2.1 requires a content_icon property in the FTI to configure 
the icon, while CMF 2.2 requires icon_expr. Unfortunately you can not 
have both in your FTI since GenericSetup will abort when it encounters 
an unknown property. The only two possible solutions are to have 
separate FTIs for CMF 2.1 an CMF 2.2, or to not use icons at all.
I would like to propose a simpler alternative: modify GenericSetup to 
only log a warning when it encounters an unknown property instead of 
aborting. That way we get automatic backward and forward compatibility 
support, while not breaking anything.

Unless there are any objections I intend to make this change in svn 
later this week.

Wichert.


More information about the Zope-CMF mailing list