<?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: Preventing provisioning duplicate Web Parts instances on Feature reactivation</title>
	<atom:link href="http://blog.mastykarz.nl/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mastykarz.nl/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/</link>
	<description>Innovation Matters &#124; SharePoint Server MVP &#124; ISSN 2210-9390</description>
	<lastBuildDate>Fri, 10 Feb 2012 18:00:19 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Cam</title>
		<link>http://blog.mastykarz.nl/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/comment-page-1/#comment-118002</link>
		<dc:creator>Cam</dc:creator>
		<pubDate>Thu, 19 Jan 2012 23:09:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/2008/05/09/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/#comment-118002</guid>
		<description>Hey Ryan,
I was running into the same problem and used Carlos&#039; suggestion here to fix it. Hope it helps someone. 

http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/2cf226bf-1fce-4866-87ef-f00c696ecbcd/</description>
		<content:encoded><![CDATA[<p>Hey Ryan,<br />
I was running into the same problem and used Carlos&#039; suggestion here to fix it. Hope it helps someone. </p>
<p><a href="http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/2cf226bf-1fce-4866-87ef-f00c696ecbcd/" rel="nofollow">http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/2cf226bf-1fce-4866-87ef-f00c696ecbcd/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://blog.mastykarz.nl/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/comment-page-1/#comment-96391</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Thu, 13 Oct 2011 13:01:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/2008/05/09/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/#comment-96391</guid>
		<description>I was running into the same problem with duplicate webparts so I was really grateful for this blogpost. However I can&#039;t seem to be able to get it to work. Deleting the webpart via the webpartmanager without checking out leads to an exception that the file isn&#039;t checked out. Checking out the page layout file before deleting the webpart gets me the exception that the file has been checked out! 

Anybody have any clue to why this isn&#039;t working. I&#039;ve also tried setting &#039;AllowUnsafeUpdates&#039; on the web where the file is residing. No dice. What am I missing?</description>
		<content:encoded><![CDATA[<p>I was running into the same problem with duplicate webparts so I was really grateful for this blogpost. However I can&#039;t seem to be able to get it to work. Deleting the webpart via the webpartmanager without checking out leads to an exception that the file isn&#039;t checked out. Checking out the page layout file before deleting the webpart gets me the exception that the file has been checked out! </p>
<p>Anybody have any clue to why this isn&#039;t working. I&#039;ve also tried setting &#039;AllowUnsafeUpdates&#039; on the web where the file is residing. No dice. What am I missing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bernado Nguyen-Hoan</title>
		<link>http://blog.mastykarz.nl/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/comment-page-1/#comment-96363</link>
		<dc:creator>Bernado Nguyen-Hoan</dc:creator>
		<pubDate>Thu, 13 Oct 2011 06:35:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/2008/05/09/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/#comment-96363</guid>
		<description>Inspired by your solution, I solved my problem by adding a code-behind class and detecting the ChangePageLayout event and remove the web parts of the current page layout in that event: http://bernado-nguyen-hoan.com/2011/10/13/removing-duplicate-web-parts-when-changing-page-layout-via-the-ribbon/</description>
		<content:encoded><![CDATA[<p>Inspired by your solution, I solved my problem by adding a code-behind class and detecting the ChangePageLayout event and remove the web parts of the current page layout in that event: <a href="http://bernado-nguyen-hoan.com/2011/10/13/removing-duplicate-web-parts-when-changing-page-layout-via-the-ribbon/" rel="nofollow">http://bernado-nguyen-hoan.com/2011/10/13/removing-duplicate-web-parts-when-changing-page-layout-via-the-ribbon/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Removing duplicate web parts when changing page layout via the ribbon &#124; Bernado Nguyen-Hoan&#039;s Blog &#8211; Coding Stories from an IT Mercenary</title>
		<link>http://blog.mastykarz.nl/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/comment-page-1/#comment-96362</link>
		<dc:creator>Removing duplicate web parts when changing page layout via the ribbon &#124; Bernado Nguyen-Hoan&#039;s Blog &#8211; Coding Stories from an IT Mercenary</dc:creator>
		<pubDate>Thu, 13 Oct 2011 06:30:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/2008/05/09/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/#comment-96362</guid>
		<description>[...] A similar issue is when you reactivate the feature that provisions the custom page layout. In this case, the web parts are duplicated on the custom page layout itself. Waldek Mastykarz has blogged about a solution for this case: http://blog.mastykarz.nl/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivati.... [...]</description>
		<content:encoded><![CDATA[<p>[...] A similar issue is when you reactivate the feature that provisions the custom page layout. In this case, the web parts are duplicated on the custom page layout itself. Waldek Mastykarz has blogged about a solution for this case: <a href="http://blog.mastykarz.nl/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivati..." rel="nofollow">http://blog.mastykarz.nl/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivati&#8230;</a>. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bernado Nguyen-Hoan</title>
		<link>http://blog.mastykarz.nl/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/comment-page-1/#comment-94140</link>
		<dc:creator>Bernado Nguyen-Hoan</dc:creator>
		<pubDate>Tue, 27 Sep 2011 00:11:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/2008/05/09/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/#comment-94140</guid>
		<description>Hey Waldek,

No, no oddities in the ULS. 

To clarify, this is what happens: User creates a new page of custom page layout 1. This has 3 web parts on it by default (added to the page layout using AllUsersWebPart). When the user uses the ribbon to change to custom page layout 2, the page now contains web parts from both the previous page layout and the new page layout.</description>
		<content:encoded><![CDATA[<p>Hey Waldek,</p>
<p>No, no oddities in the ULS. </p>
<p>To clarify, this is what happens: User creates a new page of custom page layout 1. This has 3 web parts on it by default (added to the page layout using AllUsersWebPart). When the user uses the ribbon to change to custom page layout 2, the page now contains web parts from both the previous page layout and the new page layout.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Waldek Mastykarz</title>
		<link>http://blog.mastykarz.nl/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/comment-page-1/#comment-93999</link>
		<dc:creator>Waldek Mastykarz</dc:creator>
		<pubDate>Mon, 26 Sep 2011 05:45:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/2008/05/09/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/#comment-93999</guid>
		<description>@Bernando: Unfortunately I haven&#039;t experienced such issue myself. Have you checked logs for any oddities?</description>
		<content:encoded><![CDATA[<p>@Bernando: Unfortunately I haven&#039;t experienced such issue myself. Have you checked logs for any oddities?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bernado Nguyen-Hoan</title>
		<link>http://blog.mastykarz.nl/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/comment-page-1/#comment-93996</link>
		<dc:creator>Bernado Nguyen-Hoan</dc:creator>
		<pubDate>Mon, 26 Sep 2011 05:22:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/2008/05/09/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/#comment-93996</guid>
		<description>Hey Waldek,

Many thanks for sharing this. I have a similar problem: the web parts get duplicated when I change the page layout from the ribbon while editing the page. Have you seen this before and any suggestion?

Thanks,
Bernado</description>
		<content:encoded><![CDATA[<p>Hey Waldek,</p>
<p>Many thanks for sharing this. I have a similar problem: the web parts get duplicated when I change the page layout from the ribbon while editing the page. Have you seen this before and any suggestion?</p>
<p>Thanks,<br />
Bernado</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Waldek Mastykarz</title>
		<link>http://blog.mastykarz.nl/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/comment-page-1/#comment-26225</link>
		<dc:creator>Waldek Mastykarz</dc:creator>
		<pubDate>Thu, 20 Aug 2009 20:44:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/2008/05/09/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/#comment-26225</guid>
		<description>@Peter Steffensen: yup, I checked it and it works. The problem is that the XML you get from the Web Part Export is not the thing you have to paste in the page. To see the difference simply open SharePoint Designer and drag&amp;drop the Web Part: you will see a slightly different markup - the control markup. That&#039;s the one you have to be using.</description>
		<content:encoded><![CDATA[<p>@Peter Steffensen: yup, I checked it and it works. The problem is that the XML you get from the Web Part Export is not the thing you have to paste in the page. To see the difference simply open SharePoint Designer and drag&#038;drop the Web Part: you will see a slightly different markup &#8211; the control markup. That&#039;s the one you have to be using.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Steffensen</title>
		<link>http://blog.mastykarz.nl/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/comment-page-1/#comment-26223</link>
		<dc:creator>Peter Steffensen</dc:creator>
		<pubDate>Thu, 20 Aug 2009 20:04:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/2008/05/09/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/#comment-26223</guid>
		<description>Hi Waldek.
Also facing the problem with duplicate webpart. Have you verified if the approach of copying in Webpart XML to the webpart zone works?

PS: I can get it to work by inserting a webpart outside a webpart zone but the webpart cannot be edited by the user then.</description>
		<content:encoded><![CDATA[<p>Hi Waldek.<br />
Also facing the problem with duplicate webpart. Have you verified if the approach of copying in Webpart XML to the webpart zone works?</p>
<p>PS: I can get it to work by inserting a webpart outside a webpart zone but the webpart cannot be edited by the user then.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Waldek Mastykarz</title>
		<link>http://blog.mastykarz.nl/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/comment-page-1/#comment-14452</link>
		<dc:creator>Waldek Mastykarz</dc:creator>
		<pubDate>Thu, 26 Mar 2009 19:40:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/2008/05/09/preventing-provisioning-duplicate-web-parts-instances-on-feature-reactivation/#comment-14452</guid>
		<description>@Marc: so far I was pretty sure that reverting the customization status of a Page Layout after deleting the Web Parts would do the job. If you say that you are actually experiencing issues with it, I&#039;d have to test it once again to either confirm it or not.
Meanwhile I&#039;ve talked to a SharePoint dev who said that he doesn&#039;t use Features to attach Web Parts to Page Layouts. Instead he pastes the exported Web Part XML directly into the Page Layout inside a Web Part Zone. He said it works and that he never had problems with it. I haven&#039;t tried it myself yet, but it might be just the answer we&#039;re looking for.</description>
		<content:encoded><![CDATA[<p>@Marc: so far I was pretty sure that reverting the customization status of a Page Layout after deleting the Web Parts would do the job. If you say that you are actually experiencing issues with it, I&#039;d have to test it once again to either confirm it or not.<br />
Meanwhile I&#039;ve talked to a SharePoint dev who said that he doesn&#039;t use Features to attach Web Parts to Page Layouts. Instead he pastes the exported Web Part XML directly into the Page Layout inside a Web Part Zone. He said it works and that he never had problems with it. I haven&#039;t tried it myself yet, but it might be just the answer we&#039;re looking for.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

