Home > Uncategorized > Be careful when editing the application.master page

Be careful when editing the application.master page

Here’s an odd one.

We had customized our master pages by adding in the Search WebPart, so we could customize some of the parameters

We changed the following:

<asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server"></asp:ContentPlaceHolder>

To the following:

<asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
<SPSWC:SearchBoxEx webpart="true" runat="server" __webpartid="{2883947B-2B5C-4A56-92B3-33B7383F7C0D}" id="SearchBoxEx1"><WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/WebPart/v2">
  <Title />
  <FrameType>None</FrameType>
  <Description>Used to search document and items.</Description>
  <IsIncluded>true</IsIncluded>
  <ZoneID>ImportedPartZone</ZoneID>
  <PartOrder>0</PartOrder>
  <FrameState>Normal</FrameState>
  <Height />
  <Width />
  <AllowRemove>true</AllowRemove>
  <AllowZoneChange>true</AllowZoneChange>
  <AllowMinimize>true</AllowMinimize>
  <AllowConnect>true</AllowConnect>
  <AllowEdit>true</AllowEdit>
  <AllowHide>true</AllowHide>
  <IsVisible>true</IsVisible>
  <DetailLink />
  <HelpLink />
  <HelpMode>Modeless</HelpMode>
  <Dir>Default</Dir>
  <PartImageSmall />
  <MissingAssembly>Cannot import this Web Part.</MissingAssembly>
  <PartImageLarge />
  <IsIncludedFilter />
  <ExportControlledProperties>true</ExportControlledProperties>
  <ConnectionID>00000000-0000-0000-0000-000000000000</ConnectionID>
  <ID>g_455588d4_92a9_484e_9273_9221d7a9a97f</ID>
  <GoImageUrl xmlns="urn:schemas-microsoft-com:SearchBoxEx">/_layouts/images/gosearch.gif</GoImageUrl>
  <GoImageUrlRTL xmlns="urn:schemas-microsoft-com:SearchBoxEx">/_layouts/images/goRTL.gif</GoImageUrlRTL>
  <GoImageActiveUrl xmlns="urn:schemas-microsoft-com:SearchBoxEx">/_layouts/images/gosearch.gif</GoImageActiveUrl>
  <GoImageActiveUrlRTL xmlns="urn:schemas-microsoft-com:SearchBoxEx">/_layouts/images/goRTL.gif</GoImageActiveUrlRTL>
  <DropDownModeEx xmlns="urn:schemas-microsoft-com:SearchBoxEx">ShowDD_DefaultContextual</DropDownModeEx>
  <AdvancedSearchPageURL xmlns="urn:schemas-microsoft-com:SearchBoxEx">/SearchCenter/Pages/advanced.aspx</AdvancedSearchPageURL>
  <SearchResultPageURL xmlns="urn:schemas-microsoft-com:SearchBoxEx">/SearchCenter/Pages/results.aspx</SearchResultPageURL>
  <ScopeDisplayGroupName xmlns="urn:schemas-microsoft-com:SearchBoxEx">Search Dropdown</ScopeDisplayGroupName>
  <RegisterStyles xmlns="urn:schemas-microsoft-com:SearchBoxEx">true</RegisterStyles>
  <ShouldTakeFocusIfEmpty xmlns="urn:schemas-microsoft-com:SearchBoxEx">false</ShouldTakeFocusIfEmpty>
                </WebPart>
</SPSWC:SearchBoxEx>
</asp:ContentPlaceHolder>

We did this in all our master pages including the application.master page.

All was working fine until we tried to delete a column in a list and we go the “Unknown Error” message and the column wasn’t deleted.

The following error message was be ing logged

Application error when access /_layouts/mngfield.aspx, Error=Unable to validate data.   at System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength)     at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) 

After of a month or so of investigation with Microsoft support, we discovered that the Search Webpart was causing the problem in the application.master page and causing a conflict in one of the application pages in the “Layouts” directory, specifically the mngfield.aspx page.

We have removed the Search WebPart from the application.master page and all seems to be working fine.

Advertisements
Categories: Uncategorized Tags: , ,
  1. 31 October 2007 at 11:00 am

    Thank you for this post, without it I would’ve spent countless amount of hours and days in trying to resolve this issue.

    In my case the problem encountered was that check-in and check-out gave “Unable to validate data” error.

  2. Janet
    2 November 2007 at 12:10 am

    I totally agree with Jussi. This just saved me a lot of time. THANK YOU!

  3. 16 November 2007 at 5:35 pm

    Thank you! I also had the problem on check-in check-out. So, is there a way to impletement a search in application.master at all?

  4. 26 November 2007 at 8:14 am

    I think the best way would be to code your own Search WebPart. I have been doing some reverse engineering of it and it’s not the most prettiest of WebParts internally 🙂 The application.master wasn’t meant to be a page that should be edited. Not sure why?

  5. tony
    21 February 2008 at 2:25 pm

    Thanks! This post saved me a lot of grief. Have been banging my head on the wall trying to figure out what was wrong with the document ‘check in’ erroring with the same validation problem.

  6. 6 August 2009 at 8:33 pm

    Thanks for sharing Toby! This was exactly my problem.

  7. MikeC$
    2 September 2009 at 3:00 am

    Thank you for posting this!!! I did the same thing in trying to dress up the sites. Adding a workflow to any list failed with “unknown error” and “Unable to validate data” when the master had a seach box. Sharepoint is a creaking clanking pile of S@#T!!!

  8. 2 November 2009 at 6:37 pm

    Also had the workflow problem. After spending two hours comparing my master with the ootb master, I stumbled across your post and solved my problem in 5 minutes.

    THANKS MUCH!

  9. Irene
    17 November 2009 at 4:29 am

    Nice post. Thank you so much!

  10. Yaser Abdel Salam Ali
    20 December 2009 at 12:51 pm

    I remove search box but stell have the exception
    can any one help me.

  11. Sergio
    5 February 2010 at 10:01 pm

    yuju !!!, Thank you, you just saved me lots of time.

  12. Lucas Diniz
    1 March 2010 at 9:55 pm

    I found the same problem customising my application. Following the instructions about the mngfield.aspx, I tryed to put the

    in this file.

    Worked just perfect. I didn´t have time to test elsewhere, but seems to be OK..

    Hope helped everybody.

  13. Lucas Diniz
    1 March 2010 at 9:56 pm

    I found the same problem customising my application. Following the instructions about the mngfield.aspx, I tryed to put the

    asp:Content ContentPlaceHolderId=”PlaceHolderSearchAreaW” runat=”server”
    /asp:Content

    in this file.

    Worked just perfect. I didn´t have time to test elsewhere, but seems to be OK..

    Hope helped everybody.

  14. Edgar
    30 July 2010 at 10:44 pm

    Save my day with this post, thank you

  15. Ketan
    19 October 2010 at 7:22 pm

    Thanks alot for this important article :):)

  16. newbie
    19 January 2011 at 11:30 pm

    Thank you Very Much for the resolution.
    You saved lot of trouble and helped us save big time !!!

  17. Pulkit
    5 July 2011 at 2:12 pm

    Thanks a lot.. I faced the same issue and couldnt have resolved it without reading this artcle..

  18. Alex
    19 January 2012 at 1:43 pm

    Great! Thank you!

  19. Alex
    19 January 2012 at 3:18 pm

    The problem in TextBox, other controls as buttons – work good.

    You can put you control in

    this ContentPlaceHolder did’t show in mngfield.aspx

  20. Alex
    19 January 2012 at 3:19 pm

    The problem in TextBox, other controls as buttons – work good.

    You can put you control in

    this ContentPlaceHolder did’t show in mngfield.aspx

    it’s not a dublicate comment

  1. 10 June 2013 at 9:22 am

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: