daniel
Daniel Rotter
Core developer and support guru. Passionate traveler and soccer player.
@danrot90

New in Sulu 1.5: Versioning

A very important feature for many content managers has made it into the 1.5 release of Sulu: Versioning! 

This will enable the user to restore old versions of pages and makes working with the system more comfortable since there is always a way to return to the previously published content. But let's have a look at this feature step by step:

Configuration

Enabling the feature is as easy as putting the following lines into app/config/config.yml.

sulu_document_manager:
    versioning:
        enabled: true
Configuration

Creating versions

Sulu will automatically create new versions as soon as a page is published. This includes the options "Save and publish" and "Publish" in the dropdown of the save button.

All created versions will be visible in the settings tab of every page. The list shows the date and the creator of the version which is equal to the time and changer of the save from which the version was created.

Restoring a version

When hovering one of the versions on the list a restore icon is appearing. Clicking on it will restore the version after the user confirms the dialogue. Keep in mind that the new version will not be published immediately but a new draft will be created instead. When publishing the draft a new version will be created. This way a linear history is secured which takes a lot of complexity out of the process. 

I bet a lot of people have been waiting for this feature. Unfortunately it is only available on Jackrabbit because the Doctrine DBAL implementation of Jackalope doesn't support versioning yet.

But who knows maybe we will get there one day :-)