SaaS CMS has officially launched! Learn more now.

Unable to update url segment of page when saving it to draft mode through code



We are updating a page in Optimisely through code like this -

ProfilePage profilePage = existingProfilePage.CreateWritableClone() as ProfilePage

profilePage.URLSegment = urlSegment;
profilePage.FirstName = profileForm.FirstName ?? string.Empty;
profilePage.LastName = profileForm.LastName ?? string.Empty;

//Setting the page to draft mode
profilePageId = _contentRepository.Save(profilePage, SaveAction.CheckOut, AccessLevel.NoAccess).ID

But when we are saving the page in draft mode, the url segment and page name is not updating.

How can I update the url segment and page name keeping the page in draft state itself?

We are currently using Episerver CMS - v11.20.5


Oct 13, 2021 10:30


Would you want to try <add key="DisableVersionSync" value="false" /> in your app settings and see if that reflects the update accurately?

~ Sujit

Oct 13, 2021 19:45
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.