EpiServer 8 Programatically created page does not appear in task gadget.

Vote:
 

I have created a page programatically 

var childPage = DataFactory.Instance.GetDefault(masterPage.PageLink);
childPage.PageName = childPage .PageTitle = "XXX";
childPage.URLSegment = EPiServer.Web.UrlSegment.CreateUrlSegment(childPage);
DataFactory.Instance.Save(
childPage.CreateWritableClone(),
EPiServer.DataAccess.SaveAction.Save,
EPiServer.Security.AccessLevel.NoAccess);

when web editor select the page in page tree view he can see publish option for the page

but it is not appearing in task gadget of web editor so that the editor can check his tasks and can publish the page

#121138
May 04, 2015 10:50
Vote:
 

Hi,

Can you try to use EPiServer.DataAccess.SaveAction.CheckIn instead of EPiServer.DataAccess.SaveAction.Save?

Another thing I noted in your code is you're calling CreateWritableClone in the Save-method. That's not needed as DataFactory.Instance.GetDefault<T> always returns a writable instance.

#121204
May 04, 2015 19:39
Vote:
 

I know that this is not directly to the question, but try to avoid DataFactory.Instance direct usage in your code. Go instead via IContentRepository.

#121208
May 04, 2015 21:07
* 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.