0

Sitecore 10.2 with SXA

We are facing an unexpected issue when after each deployment a few of the template's Standard Values in Layout Details get removed. As a result this removes all components from all pages based on that template.

For now, we keep the backup of templates and content before deployment, so that when this happens we restore the templates and content back.

But, we checked in our VS solution and found no pipeline that would make this change.

Any recommendations on how to identify the cause of this issue?

4
  • 1
    Sounds like the template is serialised and the deployment is reapplying the content. Do you use octopus or some other such component? Dec 26, 2022 at 13:41
  • How are you doing serialization of items and syncing that?
    – Richard Seal
    Dec 26, 2022 at 17:32
  • We are using Sitecore CLI but in the local when I do the deployment of the DLL of any project then after 3-4 minutes layout details gets removed even I dont run the CLI. Dec 26, 2022 at 17:54
  • @DeanOBrien and RichardSeal I got to know the reason that templates where this issue happening is due to that I have inherited the /sitecore/templates/Feature/Experience Accelerator/Redirects/Redirect template. As soon as I removed the Redirect template and then again inherited it and then saved then after saving the Layout Details got removed. Any idea why is this so happening? Dec 29, 2022 at 13:55

2 Answers 2

0

Check your Sitecore Content Serialization configuration, specifically the rules and their order.

The easiest way is to do it via Sitecore Module Explorer that allows to navigate through the configuration files as items in a tree structure.

So, in the Sitecore Module Explorer, in a given module, in the include, double-click on the Rules to see all the pre-defined rules, then in the Rules window for every rule, click on a rule to see & edit its properties. Find more details about editing the rules here. Carefully review the Allowed Push Operations property as it defines how items will be created, updated or deleted. Also check on the order of the rules as it dictates the exact order of how they will be applied practically.

3
  • I got to know the reason that templates where this issue happening is due to that I have inherited the /sitecore/templates/Feature/Experience Accelerator/Redirects/Redirect template. As soon as I removed the Redirect template and then again inherited it and then saved then after saving the Layout Details got removed. Any idea why is this so happening? Dec 29, 2022 at 13:54
  • Why would you inherit your custom template from the SXA Redirect one at the first instance? The purpose of the redirect functionality is to direct your end-users from a given item path to the URL set in the redirect section, i.e. the original item content is not mean to be shown to visitors. Dec 29, 2022 at 18:13
  • The client had a requirement to have a field where they can select the item where they want to redirect temporarily. So, to provide this functionality we inherited this template on those templates. Dec 30, 2022 at 6:02
0

I got to know the reason that templates, where this issue was happening, is due to that I had inherited the /sitecore/templates/Feature/Experience Accelerator/Redirects/Redirect template. As soon as I removed the Redirect template and then again inherited it and then saved then after saving the Layout Details got removed.

When I inherited the page template available at the location /sitecore/templates/Foundation/Experience Accelerator/Multisite/Content/Page then for some reason the layout details removing issue got fixed.

Not sure what is the logic/dependency behind it from Sitecore but this fixed the issue.

So, at the end where this issue was happening with the templates on inheriting the Redirect template, I inherited the page template as well and this fixed the issue for me.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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