ContentFactoryMetadata deprecation

by Plone Documentation Team last modified Dec 30, 2008 03:07 PM
CMF deprecated this call a while back, and Plone 3.0 is the first version that ships without this. Here's how to update your product to use the new syntax.

Typical error message::

Error Type: exceptions.ImportError
Error Value: cannot import name ContentFactoryMetadata

What causes this? Somewhere in your code, you have something like::

from Products.CMFCore.TypesTool import ContentFactoryMetadata

Update this to::

from Products.CMFCore.TypesTool import FactoryTypeInformation

instead, and you should be good to go. This change should work all the way back to Plone 2.1.

For a live example, see "DataGridField changeset 7901":http://dev.plone.org/archetypes/changeset/7901.