November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Did you get the FetchData working? i have problem getting the FetchData working on episerver 7.19.2
If I remember correctly my problem was that my recursive publishing was removing the FetchData property from the pages as I was publishing them.
This is no longer the case, I don't remember what fixed it though. We are also running EPiServer 7.19.2.
The only difference I can see in our current version of the recursive publishing code and what I posted here is that I no longer use "(SaveAction.Publish | SaveAction.ForceCurrentVersion)", but instead only "SaveAction.Publish".
Afaik, you are not supposed to use several flags on the DataFactory.Save command.
Hello,
I'm trying to build a plugin that recursivly publishes all the latest version of pages below the current node in the EPiServer tree. It is intended to be run after our scheduled product import job after verifying that everything is correct. My solution is almost ready but I've noticed a big problem that I have not been able to solve yet.
A lot of the imported product pages are actually duplicates of each other, just located at different places in the structure. To solve this without having duplicated content in EPiServer and without loosing SEO score for duplicated content we use the "Fetch data from another page" feature in EPiServer, PageShortCutType == PageShortcutType.FetchData, together with rendering out link rel="canonical" on the duplicated pages.
Now to the actual problem. To recursivly publish all the pages I've been using this code:
Unfortunately what I noticed was that it erased all the PageShortcutType and PageShortcutLink properties on the newly published pages.
Now this might make sense after having called CreateWriteable clone, so my idea was to try an read the properties from the original page first and then set them back on the clone before publishing it. But even then, they seem to be blank...
But maybe that is because I'm just trying to retrieve data from the orginal non-fetch data page? Since the current page in the loop does have fetch data set when I'm trying to publish it?
But following the examples in this (pretty old) discussion: http://world.episerver.com/modules/forum/pages/thread.aspx?id=31471 has yielded no results...
I'm cluess now as to why the following if-case never happens:
Trying to read the property from the writeable clone instead of the page (as suggested in the linked thread) yields no different result either.
Any ideas? Is there a better way to publish pages programatically?