November Happy Hour will be moved to Thursday December 5th.

Not published Page has empty property

Vote:
 

I have a page with status "Not ready". It has only one version. I load one by calling DataFactory.GetPage(reference);

Loaded page has not setted  custom fields. But I expect to load all data the same as I load the latest version.

Do I have wrong expectation or it's a bug of EPi Server. Why I can not to load data properly for unpublished page without workId?

#39738
May 31, 2010 14:23
Vote:
 

Hi, that is a quirk in the API, if you want to load data from a page that is not published yet you need to tell CMS to look for any version it can found (latest version since there is nothing published). You do this by constructing a new PageReference where you set anyversion=true. Like this "new PageReference(id,true)", this method causes database lookups so use with caution or as a fallback for not published pages.

#39773
Jun 01, 2010 13:33
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.