I've come across an instance where a client was using the Experience Editor to create a new version of a landing page and the components on the page did not increment the version number.

Is this expect behaviour? Or, should the components on the page also increment versions?

Ideally, the client wants to be able to revert back to the previous version for all the content (components) on the page and not just the page item itself.

Thanks everyone for contributing. It seems that the issue is with the SXA.

With "regular" Sitecore items, the versioning of components on a page is working as expected. See @hishaam's notes.

  • Does the page item have a workflow configured and in the final workflow state? when a modification is made to a field (such as the title) do you see the version increment? – Michael West Oct 2 '19 at 20:05
  • Hello Michael. The page has a workflow, but initially, the content (component) item referenced on the page didn't. I added workflow and tested, but got the same result... The page version increments, but the content (component) item doesn't increment. I am wondering if this is by design or lack of design :-| – Ken Gray Oct 3 '19 at 13:21
  • During your test, was your user an administrator? – Hishaam Namooya Oct 3 '19 at 21:30
  • No. We were using a Content Author account. – Ken Gray Oct 4 '19 at 3:56

By default, when you apply a workflow on an item and it has been updated, a new version should be created for this item.

As your page has a workflow and not your component datasource, it is the expected behaviour that the version is not incremented.

Now, if you have a workflow on the page, when the user will need to update it, he/she will require to Lock and Edit the item. This is when a new version is added to the page.

After you have applied a workflow on the datasource item, you should test it with a non Admin account as this will bypass the workflow. I have tested this on my local instance and with an Admin user, the version is not incremented even if there is a workflow on it while using a content author account, the version of that particular component datasource is incremented by 1 including the page.

If you want to still apply the workflow mechanism for admin users, you'll need to implement a handler which will get triggered on the item save event. The purpose of the handler is to change the workflow of a particular item / datasource even for admin users.

  • When you did your testing were you in the Content Editor or in the Experience Editor? I did everything you did within the Experience Editor using a Content Author (non-admin) account and only the page and not the related component (datasource item) was incremented. In the content editor, the versioning works as expected on the same data source item but not when I'm on a page within the Experience Editor. – Ken Gray Oct 4 '19 at 4:00
  • I was on the experience editor. Let me double check in case I’ve a pipeline that is allowing the workflow to change – Hishaam Namooya Oct 4 '19 at 5:15
  • That's interesting. So editing a page in Experience Editor not only creates a version for the page but also any content blocks (components/datasource items) on that page for you? Sorry, one more piece of information ...we're using SXA. – Ken Gray Oct 4 '19 at 12:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.