<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Work with Unpublished PageData from code</title>
	<atom:link href="http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/</link>
	<description>Chatter about EPiServer, ASP.NET, CSS and Web Development.</description>
	<lastBuildDate>Wed, 21 Dec 2011 01:21:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Fredrik Haglund</title>
		<link>http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/comment-page-1/#comment-4220</link>
		<dc:creator>Fredrik Haglund</dc:creator>
		<pubDate>Fri, 02 Sep 2011 15:25:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/#comment-4220</guid>
		<description>That sounds strange. DataFactory.Instance.GetChildren() in EPiServer CMS 5 and later should return all published children regardless of their Start and Stop publish date. GetChildren should not return null at all, it should return an empty PageDataCollection.</description>
		<content:encoded><![CDATA[<p>That sounds strange. DataFactory.Instance.GetChildren() in EPiServer CMS 5 and later should return all published children regardless of their Start and Stop publish date. GetChildren should not return null at all, it should return an empty PageDataCollection.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian</title>
		<link>http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/comment-page-1/#comment-4219</link>
		<dc:creator>Christian</dc:creator>
		<pubDate>Fri, 02 Sep 2011 13:35:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/#comment-4219</guid>
		<description>Thanks for the answer and yes, I am manually setting a publishing date. If I try to access the page in Norwegian it works good but from get children method I only get null in return.

I would expect to get the Norwegian branch if I explicitly ask for the no branch but I only get null. 

Thanks again! 

Christian, Iteam</description>
		<content:encoded><![CDATA[<p>Thanks for the answer and yes, I am manually setting a publishing date. If I try to access the page in Norwegian it works good but from get children method I only get null in return.</p>
<p>I would expect to get the Norwegian branch if I explicitly ask for the no branch but I only get null. </p>
<p>Thanks again! </p>
<p>Christian, Iteam</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fredrik Haglund</title>
		<link>http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/comment-page-1/#comment-4218</link>
		<dc:creator>Fredrik Haglund</dc:creator>
		<pubDate>Fri, 02 Sep 2011 13:26:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/#comment-4218</guid>
		<description>Yes, I can confirm that you always have to publish the Master Language before publishing any other Language Branches.

But what exactly do you mean by &quot;Unpublish&quot;? Are you setting the Stop Publish date or do you use SaveAction to force the current version to another status?</description>
		<content:encoded><![CDATA[<p>Yes, I can confirm that you always have to publish the Master Language before publishing any other Language Branches.</p>
<p>But what exactly do you mean by &#8220;Unpublish&#8221;? Are you setting the Stop Publish date or do you use SaveAction to force the current version to another status?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian</title>
		<link>http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/comment-page-1/#comment-4215</link>
		<dc:creator>Christian</dc:creator>
		<pubDate>Fri, 02 Sep 2011 09:08:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/#comment-4215</guid>
		<description>Hi,

I am having problems with a tricky scenario:
1. A page is created in the master language branch (Swedish)
2. The page gets translated to Norwegian and Danish
3. The Swedish page is unpublished

Now we don&#039;t get any of the pages when using GetChildren (with or without LanguageSelector.Autodetect). Have you experienced the same problem with unpublished pages in master language branch but with versions still existing in other languages?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I am having problems with a tricky scenario:<br />
1. A page is created in the master language branch (Swedish)<br />
2. The page gets translated to Norwegian and Danish<br />
3. The Swedish page is unpublished</p>
<p>Now we don&#8217;t get any of the pages when using GetChildren (with or without LanguageSelector.Autodetect). Have you experienced the same problem with unpublished pages in master language branch but with versions still existing in other languages?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fredrik Haglund</title>
		<link>http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/comment-page-1/#comment-4213</link>
		<dc:creator>Fredrik Haglund</dc:creator>
		<pubDate>Wed, 24 Aug 2011 10:49:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/#comment-4213</guid>
		<description>Ranjit, what is your question?

Explain what you try to acomplish instead, then maybe I can suggest a strategy to solve it.</description>
		<content:encoded><![CDATA[<p>Ranjit, what is your question?</p>
<p>Explain what you try to acomplish instead, then maybe I can suggest a strategy to solve it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ranjit J. Vaity</title>
		<link>http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/comment-page-1/#comment-4212</link>
		<dc:creator>Ranjit J. Vaity</dc:creator>
		<pubDate>Wed, 24 Aug 2011 10:27:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/#comment-4212</guid>
		<description>Hi,
I am trying following: 
PageData page = itemDetailPageType.CreateWritableClone();
                    page[&quot;ThumbNailImage&quot;] = uploadProductThumbDirectory + unifiledThumbFile.Name;
                    DataFactory.Instance.Save(page, SaveAction.CheckIn &#124; SaveAction.ForceCurrentVersion);

In here the thumb nail Image url gets saved to the page and is visible on the view mode. But Pages referring to this page gets &quot;ThumbNailImage&quot; ImageToUrl property as null. 

Unless I specifically publish this thumbnail page. I am capturing Page_Published event. tried Page_Publishing page but error comes &quot;PageWorkId&quot; is null.

Please suggest!

Thanks,
Ranjit J. Vaity</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I am trying following:<br />
PageData page = itemDetailPageType.CreateWritableClone();<br />
                    page["ThumbNailImage"] = uploadProductThumbDirectory + unifiledThumbFile.Name;<br />
                    DataFactory.Instance.Save(page, SaveAction.CheckIn | SaveAction.ForceCurrentVersion);</p>
<p>In here the thumb nail Image url gets saved to the page and is visible on the view mode. But Pages referring to this page gets &#8220;ThumbNailImage&#8221; ImageToUrl property as null. </p>
<p>Unless I specifically publish this thumbnail page. I am capturing Page_Published event. tried Page_Publishing page but error comes &#8220;PageWorkId&#8221; is null.</p>
<p>Please suggest!</p>
<p>Thanks,<br />
Ranjit J. Vaity</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sharron Clemons</title>
		<link>http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/comment-page-1/#comment-4128</link>
		<dc:creator>Sharron Clemons</dc:creator>
		<pubDate>Tue, 21 Dec 2010 20:21:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/#comment-4128</guid>
		<description>Good examples, thanks!</description>
		<content:encoded><![CDATA[<p>Good examples, thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emil</title>
		<link>http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/comment-page-1/#comment-3463</link>
		<dc:creator>Emil</dc:creator>
		<pubDate>Fri, 05 Mar 2010 11:49:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/#comment-3463</guid>
		<description>Life saver! :-)</description>
		<content:encoded><![CDATA[<p>Life saver! <img src='http://blog.fredrikhaglund.se/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sending an Email with an Edit Page-link &#124; Fredrik Haglund's blog</title>
		<link>http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/comment-page-1/#comment-3249</link>
		<dc:creator>Sending an Email with an Edit Page-link &#124; Fredrik Haglund's blog</dc:creator>
		<pubDate>Mon, 01 Jun 2009 13:27:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/#comment-3249</guid>
		<description>[...] more about How to work with Unpublished PageData from code in a previous blog [...]</description>
		<content:encoded><![CDATA[<p>[...] more about How to work with Unpublished PageData from code in a previous blog [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/comment-page-1/#comment-3246</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Fri, 15 May 2009 09:49:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/#comment-3246</guid>
		<description>Thanks for this - it gave me a solution for a completely un-related problem. 

I was trying to cheekily update page properties during the PublishedPage event without creating a new version of the page... I figured that it was getting the right [undocumented] SaveAction argument and the code in your last example gave me a solution, i.e. 

DataFactory.Instance.Save(page, SaveAction.CheckIn &#124; SaveAction.ForceCurrentVersion);</description>
		<content:encoded><![CDATA[<p>Thanks for this &#8211; it gave me a solution for a completely un-related problem. </p>
<p>I was trying to cheekily update page properties during the PublishedPage event without creating a new version of the page&#8230; I figured that it was getting the right [undocumented] SaveAction argument and the code in your last example gave me a solution, i.e. </p>
<p>DataFactory.Instance.Save(page, SaveAction.CheckIn | SaveAction.ForceCurrentVersion);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ross Neilson</title>
		<link>http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/comment-page-1/#comment-3245</link>
		<dc:creator>Ross Neilson</dc:creator>
		<pubDate>Mon, 11 May 2009 15:04:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/#comment-3245</guid>
		<description>Great stuff Fredrik this example really helped me out with something I was working on recently.</description>
		<content:encoded><![CDATA[<p>Great stuff Fredrik this example really helped me out with something I was working on recently.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Petter</title>
		<link>http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/comment-page-1/#comment-3183</link>
		<dc:creator>Petter</dc:creator>
		<pubDate>Thu, 19 Feb 2009 12:35:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/#comment-3183</guid>
		<description>Yes keep up the posting! I read em all and hand them out right and left when people are having problems. Your the man!</description>
		<content:encoded><![CDATA[<p>Yes keep up the posting! I read em all and hand them out right and left when people are having problems. Your the man!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicklas</title>
		<link>http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/comment-page-1/#comment-3182</link>
		<dc:creator>Nicklas</dc:creator>
		<pubDate>Thu, 19 Feb 2009 07:27:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/#comment-3182</guid>
		<description>Keep up the posting, Fredrik! This is good stuff.</description>
		<content:encoded><![CDATA[<p>Keep up the posting, Fredrik! This is good stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mari</title>
		<link>http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/comment-page-1/#comment-3181</link>
		<dc:creator>Mari</dc:creator>
		<pubDate>Wed, 18 Feb 2009 21:51:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2009/02/18/work-with-unpublished-pagedata-from-code/#comment-3181</guid>
		<description>Good examples, thanks!</description>
		<content:encoded><![CDATA[<p>Good examples, thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

