I recently encountered an issue where EPiServer Composer appeared to be serving up old versions of pages, even after they have been published. This was identified on EPiServer CMS 6 R2 and Composer 4.

The issue was traced to a particular behaviour where editors copy/pasted a Composer page that contained global Composer blocks. After this operation the newly created page would revert back to an "old" version that contained no Composer blocks. This happened after a period of time and to compound the issue it is only noticable in view mode and not edit mode.

This issue was recreated and reported to EPiServer. A bug was identified that meant EPiServer Composer showed old versions of content even after a new version has been published. This was caused by a bug in the copy/paste mechanism of EPiServer Composer. EPiServer have provided a fix for the issue. You will need ticket number DI-131516 when talking to EPiServer support if you are experiencing this issue.

The fix consists of two parts:

  1. A change to copy/paste functionality of EPiServer Composer to stop the issue occurring again
  2. A SQL script that can be run against affected page(s) to fix the issue on affected pages

The bad news is that there is no way to identify all the pages that have been affected and fix them. So I put a tool together that allows you to identify the pages affected by the issue and run the SQL script described in point 2 above against those pages. It's called FixComposerVersioning.aspx and the source is below:

<%@ Page Language="C#" AutoEventWireup="true" %>





    



    

Pages that appear to have a versioning issue in Composer


Note!! This could take a while >> Fix all items
Page Link (new window) Action
/EPiServer/CMS/Edit/Default.aspx?id=<%# Container.DataItem %> Fix this page

Steps to implement

  • Back up the database on the target environment
  • Deploy the updated DropIt.Extension.dll assembly into your application as supplied by EPiServer
  • Create a new page called FixComposerVersioning.aspx using the code above and drop it into the root of your application
  • Log in to EPiServer on the target environment as someone in the "WebAdmins" group
  • Browse to http://<target environment url>/FixComposerVersioning.aspx
  • Click the “Fix all items” link to fix all items, or "Fix this page" to fix an individual page 

Side-effects 

Using the SQL will fix will the affected pages, however this will remove all version history for those pages so a database backup should be kept for historical reasons.

Disclaimer! 

NOTE! Back up your database first, after running the fix all version history is disconnected therefore effectively being lost. Use this fix at your own risk. I take no responsibility for any loss, tears or damage caused by its use.




Comments