StagingAddOn - staging and versioning in Plone

StagingAddOn is a simple staging and versioning product. It allows:

This products aims to be an easy-to-install and easy-to-use solution.

Contents

Usage

Suppose that we have installed StagingAddOn and that our portal has a folder at /folder and a document at /folder/document whose title is "Document v1".

  1. "Document v1" is published.
  2. We decide to create a new version of this item. But we also want to keep a published, accessible version, during the edition of this new version. To do that, we select the "create new version" workflow action. This duplicates "Document v1" in the current folder (/folder/document-new-version) and redirects the user to this new item.
  3. This new item is in the initial state of the workflow ("visible", for the default Plone workflow). We can modify it, rename it as "Document v2" for example. We can also submit if we have the permission to.
  4. When this new item is published, the following happens:
  • the original document ("Document v1") is renamed as /folder/document-old-version-replaced-15042006-161234;
  • the new version is renamed as /folder/document to replace the original document.
  • the original document is automatically expired (if the configuration says so);
  • a workflow transition ("archive" for example) is automatically triggered on the original document (if the configuration says so).

There are now two items:

Note that any reference to the previously published version now points to the new version. It includes "related items", LinguaPlone translations, text links if Kupu's "resolve UID" feature is enabled, etc.

For further informations, see tests/testUsage.py: the included tests explains (in Python and in English) what StagingAddOn really does, and how to interact with its API.

Workflow requirement

The current implementation does customize your workflows when you configure it, because staging is about workflow, after all... However, the core features of StagingAddOn can be used and/or extended without using workflows. This would require user interfaces and some glue code, but this is possible. This will probably not be implemented.

Next major version of StagingAddOn will use Zope events and will therefore less interfer with the installed workflows anymore (it will merely add a transition, without adding "before scripts" to existing transitions). See Future features section below.

Other products (a.k.a. "the big warning section")

Staging and versioning are very important features that Plone is aiming to provide out of the box in the upcoming 3.0 release. Until it is released, you probably want to use the right product. StagingAddOn may not be the right tool to use. I strongly suggest to read a bit more about other products which might better fit your own needs.

Note that I have tried to be objective but, still, these are not the definitive description of the products. These are (only) my opinion, which I drew from tests I have done a few months ago (end of 2005, actually; note that these descriptions are still accurate in June 2007). You really want to try them out to decide which product should be yours.

CMFEditions
as of this writing, this is the preferred way of having multiple versions of a single item in CMF (and thus Plone). Unfortunately, it does not provide any staging feature: it is not possible to work on a version of an item while having another version published. I tend to dislike CMFEditions because of its UI. You do not really "create" a new version: you rather mark the current item as a new version. I am not sure this is all that easy to understand for end-users.
Iterate
Kapil Thangavelu "put together a product for simple staging and collaborative document editing [...] it builds on top of cmfeditions to offer explicit checkin and checkout functionality with locking" (from his e-mail on plone-developers mailing list). It is a great product on top of CMFEditions. If you like CMFEditions, you might want to give 'iterate' a try. It does not "invade" your workflow (contrary to StagingAddOn) and you should be able to implement StagingAddOn features (e.g. automatic replacement of the current version when the new version is published) without too much hassle.
EnSimpleStaging
as of this writing, this product provides advanced staging features, with separate workspaces: a staging area, where changes are done, and a "public" area where the visitors can actually view items. This might be overkill and/or not suitable for your own need (specifically if your use case is an intranet portal). Also note that the configuration of the product can be uneasy: you should take a look at the "README" file and the tutorial on plone.org. In short: this is probably a great product which is worth using it, if it suits your use case and if you succeed in configuring it.

There may be other products, but either they do not work with Plone 2.1 (or later) or I am not aware of them.

Note that "CMFEditions" and "iterate" will be part of the upcoming 3.0 release of Plone. But still, if you use Plone 2, these products might not yet be integrated enough with Plone, so this is not necessarily the way to go. Anyway, StagingAddOn will work with Plone 3.0, so you can be sure that the migration to Plone 3.0 is guaranteed and will be as smooth as possible.

Dependencies

StagingAddOn has the following dependencies:

Note that this product might work on a plain CMF portal with some slight changes. This has not been tested, though.

Installation

  1. Read the right documentation if you have never installed any product.
  2. Install the product in the file system.
  3. Install the product in your Plone portal, via the Plone control panel.
  4. Click on the "Configuration of StagingAddOn" configlet on the left column of the Plone control panel.
  5. Add a new "StagingAddOn configuration" item and fill the edit forms.

Important notes

If you have added an "after script" (scripts which are called after the transition) to the 'publish' transition of your workflow, the current installation mechanism will fail. Basically, it will refuse to replace your script by its own script. Which is nice, isn't it? In that case, taking a look at the install() method in content/configuration.py should help.

In the same way, uninstallation of StagingAddOn may fail. This is a somewhat known problem, but I am not very willing to fix that, because of the number of cases where we simply cannot uninstall things without risking to break workflow customizations. In these cases, reading the unInstall() method in 'content/configuration.py' should give you a good insight of how you can manually uninstall StagingAddOn.

Hopefully, StagingAddOn 2.0 will be much less invasive. See Future features below.

Other informations

Other informations (including a complete how-to in Python) are located in the doc/ folder.

Future features

The 2.0 version of StagingAddOn will use Zope 2.9 and CMF 2 features. The event system will allow us to be less invasive toward the workflow. However, the use of these features means that SAO 2.0 will not be compatible with versions prior to Plone 3 anymore.

Credits

The development of this product has been initially (up to version 0.9) sponsored by Materis. Thanks to them! It has then been developed by Pilot Systems.

The following people have contributed to this product:

Bug report and patches

Please report bugs at http://plone.org/products/stagingaddon/issues. Patches, ideas and tests are much welcome.

However, please do not add new features without prior discussion with the maintainer. StagingAddOn aims at being and remaining simple, before all else.

License

See LICENSE.txt.