Talk about a needle in a haystack! I created a custom master page for my Publishing site. Whenever I tried to create a “normal” column in the browser, things worked fine, but whenever I tried to create a Publishing column (of type HTML, Image, or Link), all of a sudden I got an error (and a very helpful one at that):

Object reference not set to an instance of an object.

This was the stack trace:

[NullReferenceException: Object reference not set to an instance of an object.] Microsoft.SharePoint.ApplicationPages.FieldCustomizationPage.CreateChildControls() +38
Microsoft.SharePoint.ApplicationPages.FieldNewPage.CreateChildControls() +48 System.Web.UI.Control.EnsureChildControls() +188
Microsoft.SharePoint.ApplicationPages.FieldCustomizationPage.OnLoad(EventArgs e) +129
Microsoft.SharePoint.ApplicationPages.FieldNewPage.OnLoad(EventArgs e) +17 System.Web.UI.Control.LoadRecursive() +94
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2935

I spent about 4 hours painstakingly narrowing down the error in my master page, line by line, until I discovered the culprit: apparently the PlaceHolderPageDescription cannot be nested inside the PlaceHolderPageTitleInTitleArea placeholder. (I was doing so in order to show the page description under the page title/breadcrumb that shows up in SharePoint 2013 sites at the top of the page.) This is what doesn’t work:

<asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server">
<asp:ContentPlaceHolder id="PlaceHolderPageDescription" runat="server" />

Once I moved the PlaceHolderPageDescription outside of the PlaceHolderPageTitleInTitleArea things worked fine. (Ironically, it wasn’t the fact that the description placeholder couldn’t be placed inside any other placeholder; I put it inside the PlaceHolderLeftNavBar placeholder and things worked fine. For whatever reason, the problem seems to be with just the exact scenario I had.

I’m sure there will only be about 1 or 2 people out there who ever run into this again, but perhaps it will spare whoever that is the same sink hole of time I encountered!

About Admin

Owner of Savvy Technical Solutions

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.