Magnolia 5.3 reached end of life on June 30, 2017. This branch is no longer supported, see End-of-life policy.

Page tree
Skip to end of metadata
Go to start of metadata

Versioning functionality is useful in many instances, for example when you want to display a different version of a page for a defined period, or if you simply decide to revert to a previous version.

No user-steps are necessary to create versions. Versions are created and saved automatically by Magnolia at defined trigger-points. Versions can be reverted to as necessary.

By default, versions are created when pages, assets and contacts are published and unpublished in the Pages, Assets and Contacts apps. Versions are also created in these apps for the purpose of restoring items prior to deletion. For more information see Deleting and restoring.

For more on version functionality and configuration see Versions.

Versioning actions

There are four versioning actions:

  • Show versions
  • Restore version
  • Compare versions
  • Compare to previous version

The actions are inactive in the action bar until you create content versions by publishing, unpublishing or deleting.

In a new installation of the Magnolia bundle all demo pages, assets and contacts do not have versions because the content is bootstrapped into the web application and marked as published. This is the reason the status indicator is green (published), but no actual publication has taken place at this point in time.

Showing versions

The Show versions action provides access to versions. This action is available in the Pages, Assets and Contacts apps and opens a dialog containing a list of versions. If workflow is enabled, the workflow comment is appended for each version (second set of brackets).

To show a version, select the version and click Show. The selected page, asset or contact opens for viewing. (warning) Note that you cannot edit in view mode.

Comparing versions

In the Pages app two additional actions are available:

  • Compare to previous version compares the current to the previous version and opens the page in diff view that uses redlining: deletions are highlighted in red and insertions in green.
  • Compare versions allows you to select the versions to be compared. Select a From and To version and click Compare to open the page in diff view.

The diff view shows a comparison of the rendered HTML of two versions of a page. It does not show changes made to assets or other editorial content (for example contacts) in another app. For example, if you amend a page component by selecting a different image, the changes will be highlighted. However, if you crop an image in the Assets app, the changes to the image will not be highlighted, because the HTML has not changed. 

For more information see Comparing versions.

Restoring versions

The Restore versions action allows you to revert to a previous version. It is available in the Pages, Assets and Contacts apps. Select the version and click Restore. A new version is created automatically prior to restore. After restoring you need to publish the restored item.