SharePoint Blogs / SharePoint University
SharePoint Blogs and SharePoint University - all in one place!
Need SharePoint Training? Attend a SharePoint Bootcamp!

Please delete cookies related to sharepointblogs.com and sharepointu.com to resolve login issues!

PlaceHolderPageTitle is the root of all evil

Recently we have been experiencing some serious problems while working on our newest project. As we needed a customized version of the Publishing Portal template we have made a new version adjusted to our needs. What we needed to do is to reference the customized Master Page and create a default Welcome Page using one of our Page Layouts. And then it's started.

First of all we got some really strange error messages like 'Page contains illegal characters', etc. After stripping the whole Site Definition and having looked at every comma out there I have found something strange was going on with our Page Layouts. At the bottom of each one of them I've found:

<html xmlns:mso="urn:schemas-microsoft-com:office:office"
xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"><head> <META name="WebPartPageExpansion" content="full"> <!--[if gte mso 9]><xml> <mso:CustomDocumentProperties> <mso:PublishingPreviewImage msdt:dt="string"></mso:PublishingPreviewImage> <mso:ContentType msdt:dt="string">Page Layout</mso:ContentType> <mso:MasterPageDescription msdt:dt="string"></mso:MasterPageDescription> <mso:PublishingAssociatedVariations msdt:dt="string">
</mso:PublishingAssociatedVariations> <mso:PublishingHidden msdt:dt="string">0</mso:PublishingHidden> <mso:PublishingAssociatedContentType msdt:dt="string">
;#Agenda item;#0x010100C568DB52D...;#</mso:PublishingAssociatedContentType> </mso:CustomDocumentProperties> </xml><![endif]--> <title>Dummy Content Type</title></head>

Because the deployment using Features didn't work I have tried using the Upload button in the Master Page Gallery. Still the extra piece of code has been added at the bottom of the uploaded Page Layout.

The next thing I've tried was uploading a Page Layout from one of our previous projects. Amazingly this one was ok! After analyzing the content of the Page Layout I've found out that the only difference was the

<asp:Content contentplaceholderid="PlaceHolderPageTitle" runat="server">
    <SharePointWebControls:FieldValue id="PageTitle"
FieldName="Title" runat="server"/> </asp:Content>
At the beginning of the project I've removed this piece of code from the Page Layouts because I've created a custom control writing the complete title string using the current hierarchy. After all the hours spent on this bug I've found that you should never remove the above piece of code - whether you use is or not. It seems that removing it causes SharePoint not to recognize the uploaded Page Layout as a Page Layout what makes it add the selected Content Type reference at the bottom of the file.

Posted 11-19-2007 10:28 AM by Waldek Mastykarz

Comments

SharePoint 2007 Link love: 11-19-2007, part one at Virtual Generations wrote SharePoint 2007 Link love: 11-19-2007, part one at Virtual Generations
on 11-19-2007 3:58 AM

Pingback from  SharePoint 2007 Link love: 11-19-2007, part one at  Virtual Generations

SharePoint 2007 Link love: 11-19-2007, part four at Virtual Generations wrote SharePoint 2007 Link love: 11-19-2007, part four at Virtual Generations
on 11-19-2007 8:35 AM

Pingback from  SharePoint 2007 Link love: 11-19-2007, part four at  Virtual Generations

Tech MOSS Team wrote Automatically generating a hierarchical Title in <title> element
on 01-06-2008 11:33 AM

Recently while working on an Internet facing web site for one of our customers I thought of creating

SHAREPOINTBlogs.com Mirror wrote Automatically generating a hierarchical Title in <title> element
on 01-06-2008 12:21 PM

Recently while working on an Internet facing web site for one of our customers I thought of creating

Waldek Mastykarz » Blog Archive » Automatically generating a hierarchical Title in <title> element wrote Waldek Mastykarz &raquo; Blog Archive &raquo; Automatically generating a hierarchical Title in &lt;title&gt; element
on 02-16-2008 6:06 AM

Pingback from  Waldek Mastykarz  &raquo; Blog Archive   &raquo; Automatically generating a hierarchical Title in &lt;title&gt; element

James Tsai's Blog wrote Code blocks are not allowed in this file - SharePoint error with custom page layout
on 04-04-2008 7:25 AM

Code blocks are not allowed in this file - SharePoint error with custom page layout

if gte mso wrote if gte mso
on 05-31-2008 9:15 AM

Pingback from  if gte mso

Marco Rizzi - All around Sharepoint wrote Page layouts installed with feature constain illegal characters.
on 07-01-2008 5:56 AM

During this week I had a problem with page layouts installation via features. In the past, I created...

SPSherm.MyBlog wrote Server Controls Case-Sensitivity in Page Layouts?
on 07-27-2008 1:15 PM

I came across this in late 2007, and forgot to blog about it. Just catching up, and wanting to post it

Ramaprasad wrote re: PlaceHolderPageTitle is the root of all evil
on 02-09-2009 10:06 AM

I want to change the title in the title bar  of IE window. But I could not change that in custom master page. I changed that in wss.resx fiel. It changed. But for the home page, it does not change.

Any idea why it is ?

Please help....

Ramaprasad wrote re: PlaceHolderPageTitle is the root of all evil
on 02-09-2009 10:12 AM

In MOSS server, SQL server exe takes 7.5 GB out of 8 GB, if wee the performance of the computer in Windows task manager => Performance => PF usage, even if there are no web requests  to the MOSS server.

Any idea what could be the reason

peace wrote re: PlaceHolderPageTitle is the root of all evil
on 02-20-2009 1:48 AM

I am trying to solve page layout issue since last few days...if this helps solve my issue...ur the man!

Waldek Mastykarz wrote re: PlaceHolderPageTitle is the root of all evil
on 02-20-2009 7:13 AM

@peace: crossing my fingers for you...

... wrote re: PlaceHolderPageTitle is the root of all evil
on 03-05-2009 7:36 AM

Gute Arbeit hier! Gute Inhalte.

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Need SharePoint Training? Attend a SharePoint Bootcamp!
Posts (c) their respective authors. Everything else (c) 2009 SharePoint Experts, Inc.