Changing Data Item Templates in Sitecore: What Happens Behind the Scenes?

 What actually happens when you change the template of an item with multiple versions?

  • Does each version hang on to the old template, except for the version where you hit the switch?
  • Or do they all get a forced makeover with the new template fields?
I have created an item with two versions using the Basic Message Template, each containing different content.

Scenario 1: 


Version 1



Version 2

Now I will update the item template for version 2 with 
/sitecore/templates/Project/Change Basic Message.


After changing the template, my existing template field data was lost. Additionally, the template change affected all versions of the item, not just the current version.


Version 2 after the template change (all data lost).


Version 1 after the template change (all data lost).

Scenario 2:

I have developed a new template, and some field names are identical to those in the existing template.





Let's update the item template with /sitecore/templates/Project/Change Basic Message Partial.

Changing the template may result in data loss. If the new template contains the same fields as the existing template, the field values will be merged.



Version 2 has been updated after the template change, causing only the mismatched field data to be lost.

Version 1 has been updated after the template change, causing only the mismatched field data to be lost.

All versions of the item have been updated to a new template.

Comments

Popular posts from this blog

How to Enable Voice Search in Sitecore Content Editor

How to Create a Component in Next.js for XM Cloud

How to Create a Custom Component in XM Cloud.