Try our conversational search powered by Generative AI!

beta/contentSaved event publishes wrong data

Fixed in

EPiServer.CMS.UI 11.11.0

(Or a related package)

Created

Sep 20, 2018

Updated

Oct 29, 2018

Area

CMS UI

State

Closed, Fixed and tested


Description

Steps to reproduce:

  1. Add the following to the _Root.cshtml in the alloy templates at the bottom of the body tag.

            <script>
                window.addEventListener('load', function() {
                    window.epi.subscribe('beta/contentSaved', function(details) {
                        console.table(details);
                    });
                });
            </script>
        </body>
    

  2. Go to the site and edit a published page.
  3. Look at the browser console.

Expected:
To get these values:

  • oldContentLink should have a value
  • hasContentLinkChanged should be true, a new version was created

Actual:
This object:

{
    contentLink: "5_115", 
    hasContentLinkChanged: false, // this part is wrong
    properties: [{…}],
    publishedContentLink: null, 
    savedContentLink: "5_115",
    successful: true,
    validationErrors: []
}