Cleaning Contentobjects when a behavior is removed?

What is the right way to cleaning existing contentobjects in the Data.fs if i remove a behavior from the FTI. Does the data live on or is it removed after packing? What happen with the the Data in far away Plone Upgrade? Should i iterate over the whole content and delete the data of the behavior or can i ignore it?

1 Like

The data is still available as an attribute on the object. You need to actively delete it. I do so in an upgrade step iterating over the result of a catalog query (affected portal_types) and a del obj.old_attribute.

2 Likes

Thanks @jensens for clarify the situation. It's good to know.

Some behaviours (from add-ons) adds interfaces that can be frustrating in later upgrades. There is wildcard.fixpersistentutilities and some other wilcard-product I have used to 'fix it', but it would be better to remove them earlier. I am not sure what is the way. Maybe make a new uninstall profile in the behaviour add on, or maybe there is an 'erase obj interface' ?

Plone Foundation Code of Conduct