sitecoresitecore8sitecore8.1experience-editor

Final Layout being wiped out when editing text field in Sitecore 8.1


I have a strange issue whereby when I edit a rich text field in the experience editor and save the page, it takes me to the layout not found page.

When switching back to the content editor, I can see that final layout has been completely wiped (the shared remains intact). I've noticed that if I change to the shared layout within the experience editor (via the presentation tab) and perform the same edit - it works fine.

What would cause the final layout to be wiped?


Solution

  • I've noticed that this can be caused by having Final Renderings set on a template's standard values. Currently I can't think of a reason to do this but I can see how it's very easy to accidentally edit a standard values item in the experience editor in the wrong mode.

    It's easy to reset presentation details back to standard values in Sitecore, but to my knowledge you can't reset just the final renderings. To avoid having to go through each failing template and manually reset and re-add all the added renderings I've found an easy way to fix it if you have TDS (or similar) installed.

    1. Search for __Final in the /Sitecore/templates folder in the file system.
    2. Delete all the instances of this __Final Renderings field (From the '----field----' line until the next one).
    3. Sync with Sitecore.

    Not really a fix to the issue, but when I had to fix >20 templates where this was happening it saved me a lot of time and thought it was worth a share.