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

Bug with pages having VersionStatus.CheckedOut as status?

Vote:
 

Hi

I'm experiencing in my opinion a little strange behaviour with pages having the VersionStatus.CheckedOut status. (aka ready to publish).

I programatically create these pages as FetchDataFrom-pages, and then I save them with the SaveAction.Save setting.

 

If I then loop through these pages before anyone publishes them, they have a page.LinkType == PageShortcutType.Normal and they also have page.Property["PageShortcutLink"].Value equal to null. In my opinion these values should be page.LinkType == PageShortcutType.FetchData and page.Property["PageShortcutLink"].Value equal to some other pageId. 

When I edit the page (before publish), the PageShortcutLink is filled in. If I publish the page all becomes as I expect it to be with the correct FetchData-Values.

 

Is there any good reason for this behaviour?

It almost seems like a bug to me.

 

/Andreas 

#51819
Jun 23, 2011 13:51
Vote:
 

I will answer my own question here.

Yes this is a bug, check out this thread: http://world.episerver.com/Modules/Forum/Pages/thread.aspx?id=54481

As Anders Hattestad says in the thread, the solution is to use GetPage after you have found the page like this:

   PageData page = DataFactory.GetPage(new PageReference(pageData.PageLink.ID, true));

The page object will now have all properties aviable.

#59591
Jun 18, 2012 16:19
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.