Editing an item in Sitecore should automatically create new version

I am looking for configuration setting(s) that are required to automatically create a new version on editing an item.

3 Replies

  • Hi Preeti,

    Probably you should use Sitecore workflows to do that.
    You can read more about it here: www.sitecore.net/.../thoughts-on-versioning-items-with-the-sitecore-aspnet-cms.aspx
  • Hi Preeti,

    I was just involved with figuring out a way to achieve this for a client. So Lukasz is correct, this should be achieved with Workflow. But workflow will only create one version of an item for the entire workflow process of that item.  So only once that item reaches the final workflow state, will editing that item automatically trigger a new version to be created.

    So if you are trying to create a way to track every change of an item as it goes thru workflow, you'll probably need to customize the OnItemSave event, to create these version. A work around that I found, that doesn't require any customizations and assuming you do not need to actually use workflow to limit content by different roles, is to setup one-state workflow which is the final workflow state. So when you "Lock/Edit" the item it will automatically create a new version of the item because all versions of the item are in the final workflow state.

    Though be very careful with this approach, you will end up creating a massive amount of versions for every item, and that could lead to performance problems with your editor. I would advice you to consider setting up some form of removal of excessive versions on items, either performing this onitemsave event, or via some form of scheduled task.

    Dylan Young
    Blog: http://sitecoremaster.com

  • Here is the configuration that might help you:
    paragdaraji.wordpress.com/.../