Sep 17, 2010

“You must specify a value for this required field” error on branded site

Afer branding this SharePoint 2010 site for a customer they encountered this weird error while saving edited pages: “You must specify a value for this required field” with no indication as to what field this refers to. No workflow was attached to the page library and furthermore, this applied specifically team sites, not publishing sites.

I first tarcked this down to the Comments-field of - what? The SitePages library versioning. So I had two workatrounds to offer the customer: disable page versioning or always check out/in pages, which asks for the comment, thus actually asking for the required value.

This however was just a workaround, not satisfactory enough, so some real solution was called for. Googling, once again I managed to acquire a solution that was so simple in itself, yet so farfetched that I was real sceptic about it. But it worked!

In a nutshell, the reason for this error was the hiding of the PlaceHolderPageTitleInTitleArea. I had moved this place holder in my master page to the hidden panel, with opening tag:
asp:panel  visible="false" runat="server"
This for some reason resulted in the error, but when changing the visibility setting to be done by a CSS rule, the error disappeared. Simply, add this CSS class, eg.
.hiddenpanel{
display: none;
}
Then replace the visible="false" attribute in the asp:panel tag by cssclass="hiddenpanel" attribute. And that's it.

12 comments:

Matt Hughes said...

I had this same problem too, really annoying, glad you got it sorted though.
Branding is an interesting and frustrating process sometimes.

Anonymous said...

this placeholder comes into a h2 tag . style="display:none" in this tag do the trick without going to the css file and add a new class ..

Maxine said...

Thank you!!! just wanted to add for those of us who start branding from the "starter master page" from codeplex (http://startermasterpages.codeplex.com/), that the cssclass attribute is not valid with the doctype"-//W3C//DTD XHTML 1.0 strict//EN" and will error. instead, define the class (or if you prefer, dont and use the style tag from above) in the section



note the hiddenpanel css class is configured for the panel - replacing the visable="false" that is currently applied in the master page.

Maxine said...

sorry - code above was removed - here is the area you want to edit in the starter master page:




hope that works.

Maxine said...

nope, ok try this
<!-- ===== Hidden Placeholders ============================================================ -->
<asp:Panel cssclass="hiddenpanel" runat="server">

Anonymous said...

Thanks Sanna and everyone. I just left it where it was and set the display to none. Bingo!

Togotooner said...

Wish I knew what the heck you guys/gals are talking about....I get the error,..but I can;t figure out EXACTLY where to put the code in. I do not have the "PlaceHolderPageTitleInTitleArea" header anywhere in the code. I know just enough to break the page so that I can customize it,...but have no idea about the coding and lingo used to reference the code/tag locations.

SM said...

@Togotooner: You will find the PlaceHolderPageTitleInTitleArea (which is the ID for this specific content place holder) in the Master Page used on the page giving this error.

Navid said...

Thanks for this article.
You can do this by using a simple DIV tag and inline style.

Is there any difference between using asp:panel or html div ???

Anonymous said...

THAAAAAAAAAAAANK YOOOOOOOOOOOOUU!!!

Amit said...

Had this problem and YOU solved it. Thank YOU so much!!!!!

Anonymous said...

Great !!! Really Helpful.

Thanks