Page Layouts, Zone Templates, and Content Editor Web parts

Posted: December 9, 2009 in MOSS 2007

Page Layouts, Zone Templates, and Content Editor Web parts

So I have a simple task.
 Create a page layout, deployable via wsp that has multiple web part zones with content editor web parts inserted into them with default content and styling applied. I also needed to do it with “no code”.

I get about the task and first run works great:



<WebPartPages:ContentEditorWebPart runat="server" ID="StorySubheadlineContent">

<WebPart xmlns:xsi="; xmlns:xsd="; xmlns=""&gt;

  <Title>QNews subheadline</Title>


  <Description>QNews article sub headline .</Description>





  <Height />

  <Width />








  <DetailLink />

  <HelpLink />



  <PartImageSmall />

  <MissingAssembly>Cannot import this Web Part.</MissingAssembly>


  <IsIncludedFilter />

  <ContentLink xmlns="; />

  <Content xmlns="">&lt;![CDATA[<FONT size=3><STRONG>This is formatted text</STRONG></FONT>]]></Content>

  <PartStorage xmlns="; />





Next time around, I manually upload the aspx into the pagelayouts/masterpage lib over top of the old one, publish it, approve it and all hell breaks loose. Sometimes I get the same web part twice,m some uploads, I get “No parameterless constructor defined for this object.” message trying to create the page with the template. I can remove everything from the entire layout except the word “hi” and this message keeps coming.  


It is clearing the parameterless constructor message I find my savior at:


What I find is MOSS would add the new web parts I put in and cache the old ones. Even though they no longer existed in the aspx file, they did to MOSS and they would until manually cleared through the web part maintenance page. So if you find yourself in this pickle, try the following procedure as you are updating the aspx file.


1.       Save new aspx to the development HD.

2.       Go to http://<server url>/_catalogs/masterpage/<pagelayoutname>.aspx?contents=1

3.       Check out, Delete all web parts

4.       Upload new version

5.       Publish and approve

I hope this can save some of you a good deal of time.

  1. Rubens says:

    Somebody buy this man a beer!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s