none
Unexpected Error with List Form: RRS feed

  • Question

  • We get the following error when we try to re-add the OOTB New List Form back onto a custom page (i.e. a copy of the NewForm.aspx).

    We haven't customised the NewForm.aspx, but it seems the ListForm is also missing on this page... it almost seems if the list is corrupt. We're at the latest SP3/CU patch level.

    08/09/2012 09:22:38.25 w3wp.exe (0x0C94)                       0x1E80 Windows SharePoint Services   Web Parts                     7935 Information http://SERVER/Procurement/Lists/Supplier Request/NewForm_Testing.aspx - An unexpected error has been encountered in this Web Part.  Type: Microsoft.SharePoint.WebPartPages.ListFormWebPart, Error: An error has occurred., DesignText: <WebPartPages:ListFormWebPart webpart="true" runat="server"><WebPart xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/WebPart/v2"><FrameType>None</FrameType> <ListName xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">{2184B5D8-363E-45A9-BA89-12895A63307D}</ListName> <FormType xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">8</FormType>  <Toolbar xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm"></Toolbar>   <PartOrder>1</PartOrder>   <I...  
    08/09/2012 09:22:38.25* w3wp.exe (0x0C94)                       ...D>g_c5e96c32_9755_422c_ae3a_dae6076cd18e</ID>  </WebPart></WebPartPages:ListFormWebPart>, SourcePreamble: TAG2  Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c  Microsoft.SharePoint.  

    Any thoughts?

    Wednesday, August 8, 2012 11:35 PM

Answers

  • Ok, we think we fixed it. 

    The List had definitely become corrupted. See the following from the list MANIFEST.XML when we saved it as a template:

    Missing NewForm and Disp Form here:

    <Forms>
      <Form Type="EditForm" Name="{335ACD6F-5381-4896-8758-F6DC5B32DC9E}" Url="Lists/Supplier Request/EditForm.aspx" Default="TRUE" /> 
    </Forms>

    Strange corruption with the OOTB List Form for the DispForm's Web Part (BADMARKUP):

      <WebPart ID="{8B6E3A0C-990D-4F46-95FA-B218E22631A7}" 
    List="{2184B5D8-363E-45A9-BA89-12895A63307D}" Type="4" Flags="1"
    Url="Lists/Supplier Request/DispForm.aspx" WebPartOrder="0"
    WebPartZoneID="g_E47D0D4261C44E8FBB57B4A06622B224" IsIncluded="1" FrameState="0"
    WPTypeId="{E6377261-6920-BBFE-501F-FDA7A61DB10F}"
    Src="BADMARKUP <?xml version="1.0" encoding="utf-16"?> <BadMarkupData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <RepresentableWebPartType>Microsoft.SharePoint.WebPartPages.ListFormWebPart</RepresentableWebPartType> <ErrorMessage>An error has occurred.</ErrorMessage> <ErrorDetails /> <DesignText>&lt;WebPartPages:ListFormWebPart webpart="true" runat="server"&gt;&lt;WebPart xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/WebPart/v2"&gt;&lt;FrameType&gt;None&lt;/FrameType&gt; &lt;ListName xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm"&gt;{2184B5D8-363E-45A9-BA89-12895A63307D}&lt;/ListName&gt; &lt;FormType xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm"&gt;4&lt;/FormType&gt; &lt;Toolbar xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm"&gt;&lt;/Toolbar&gt; &lt;PartOrder&gt;1&lt;/PartOrder&gt; &lt;ID&gt;g_8b6e3a0c_990d_4f46_95fa_b218e22631a7&lt;/ID&gt; &lt;/WebPart&gt;&lt;/WebPartPages:ListFormWebPart&gt;</DesignText> <SourcePreamble>TAG2 Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c Microsoft.SharePoint.WebPartPages WebPartPages </SourcePreamble> <AllRegisterDirectives>&lt;%@ Register TagPrefix="asp" Namespace="System.Web.UI.WebControls.WebParts" Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" %&gt; &lt;%@ Register TagPrefix="sharepoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %&gt; &lt;%@ Register TagPrefix="utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %&gt; &lt;%@ Register TagPrefix="webpartpages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %&gt; </AllRegisterDirectives> </BadMarkupData>" />

    So we fixed up these <WebParts> tags (added the missing NewForm one and comparing to another working list) and then added the missing <Forms> making sure the GUIDs matched-up. We then re-packed the CAB using the old CabPack tool (IZARC didn't want to include the Manifest.xml in the CAB for some reason) and then uploaded it as a new list template.

    We then deleted the original list and created a new list with the same name using this new STP. We then re-attached the workflow on the list and it seemed to take. Thankfully.

    (Aside: I also needed to edit the Content Type in PowerShell to force the correct New/Edit/Disp pages:

    $w = $s.OpenWeb()
    $l = $w.Lists["Supplier Request"]
    $ct = $l.ContentTypes["Item"]
    $ct.NewFormUrl = "/Procurement/Lists/Supplier Request/NewForm.aspx"
    $ct.EditFormUrl = "/Procurement/Lists/Supplier Request/EditForm.aspx"
    $ct.DisplayFormUrl = "/Procurement/Lists/Supplier Request/DispForm.aspx"
    $ct.Update()
    $l.Update()

    )

    Seems to underscore why I call SharePoint Designer, SharePoint Mangler.





    • Marked as answer by Peter_D503 Thursday, August 9, 2012 6:25 AM
    • Edited by Peter_D503 Thursday, August 9, 2012 6:29 AM
    Thursday, August 9, 2012 6:24 AM