Vulnerability in EPiServer.Forms
i am trying to updated pages programmatically, which works fine. However, i want to have the page to show the edited icon shown below:
if i update the page via the UI it shows, however, saving the page programmatically doesnt show any indication that the page is updated, i have to click the page to get the "Ready to be published" in the UI.
Even if i reload the entire edit mode, it doesnt reflect the pages in the pagetree which is updated.
this is the code i am using to save the page
var saveAction = SaveAction.ForceNewVersion;
var newReference = _contentRepository.Save(page, saveAction, EPiServer.Security.AccessLevel.NoAccess);
Any suggestions of how to align those states?
So you're basically trying to set the in-use notification.
From the client side, you can make a post request to /EPiServer/cms/Stores/inusenotification/
You'll have to submit the following parameters in the body:
You can achieve the same using IInUseNotificationRepository:
LanguageBranch = page.LanguageBranch,
ContentGuid = page.ContentGuid,
User = HttpContext.User.Identity.Name,
AddedManually = false
Hope this helps!