Enabling versioning to Dexterity content types

by Rafael Oliveira last modified Jul 14, 2011 09:34 PM
Explains how to enable versioning for a Dexterity content type. Versioning is provided by the CMFEditions add-on.

Introduction

Versioning is provided in Plone by two packages:

Both work "out of the box" with the standard Plone content types, which are based on Archetypes. To enable versioning for a Dexterity content type it's needed to install some dependencies and do some configuration.

Required packages

To enable versioning on a Dexterity content type you need to have the following packages on your buildout:

Configuration

Once the required packages are available on your buildout, do the following:

  1. Apply the GenericSetup profile of collective.dexteritydiff on the Plone Site.
  2. Go to the types control panel (@@types-controlpanel) and set the versioning option for the content type to automatic or manual.
  3. Go to the portal_diff tool page on the ZMI.
  4. Add Compound Diff for Dexterity types for the content type. Field name can be anything, e.g: "any".

That's it. If you want to do this configuration on the file system (i.e on the Python package containing the content type) then you must:

  1. Declare the required packages as dependencies on setup.py.
  2. Make the GenericSetup profile of your package depends on the profile of collective.dexteritydiff in your metadata.xml.
  3. Check the Enabling versioning on your custom content-types appendix of the Plone developer manual. It is for Archetypes-based content types, but adaptation for Dexterity is straight-forward.

Known issues and pitfalls

  • Needs more real world usage/testing/feedback.
  • There's no support for blob-based fields. Non-blob-based file and image fields are OK.