1 min read
BrandingSharePoint

Error: “You must specify a value for this required field” when adding web parts to a page with a modified master page

When branding a SharePoint site it is common to want to remove certain default Web Controls or Content Place Holders.  However I came a across an instance today where I had commented out a number of place holders (specifically the PlaceHolderPageTitleInTitleArea place holder) , the site compiled ok and allowed me to deploy it to a site. The problem came when I tried to add a web part to the site, at this point the “You must specify a value for this required field” error appeared and would not let me save the new created web part.

It appears that some controls are still required on the master page for various tasks such as adding web parts.  On reflection it seems that the best practice for skinning SharePoint Sites would be not to remove or comment out place holders but to enclose them in a containing element and set the visibility status to hidden.  for example:

CSS

Code Behind

Sample code showing how to hide a sharepoint 2010 content place holder

By following these steps I was able to hide the content on the master page as I wished, whilst still leaving the master page in an operational state.

Want more cloud insights? Listen to Cloudy with a Chance of Insights podcast:

Spotify | YouTube | Apple Podcasts

Tags

brandingerror
Like this article?

Comments

Richard Hogan

Richard Hogan

Author & Host

Richard is a Microsoft-focused architect and consultant with deep expertise in Azure, Microsoft 365, cybersecurity, and enterprise cloud migration. He is the founder of The Microsoft Cloud Blog and co-host of the Cloudy with a Chance of Insights podcast. All views expressed are his own.

You might also like

In-depth cloud tech discussions from Microsoft experts.

Expert insights on Microsoft Azure, cloud architecture, and enterprise technology.