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.
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.