locked
List DispForm corrupt url RRS feed

  • Question

  • I am working in SP Designer 2007 on a MOSS 2007 publishing sitecollection root web.  I accidently deleted a custom display form that was the current display form for a list based on a custom content type.  Despite designating a new display form, now any link to the display form shows the url as http://mytopsite/?ID=xxxx instead of http://mytopsite/sites/mysite/lists/mylist/DispForm_v1.aspx?ID=xxxx .

    SP Designer mylist properties supporting files dialog box seems to have no effect (yes I am setting the form url against the content type and not folder).  The supporting files dialog displays the desired form url (closed/reopened to ensure it saved my selection), but still the erroneous url when I click ECB view items menu option, title field link, or lookup link in another list. 

    • I attempted to reset the original dispform.aspx, a copy of the deleted form, and a new custom form
    • all forms are valid and can be rendered by typing in the url and ID parameter
    • the custom content type is the only content type in the list and is correctly displayed as default. 
    • I attempted to set the contenttype.DisplayFormUrl via a console app to no effect

    Has any dealt with this problem?  Is the corruption in the list definition?  If the API cannot change the default Display Form, can it be edited somewhere in markup?

    Desparate

    Fred

    Saturday, March 17, 2012 3:14 PM

Answers

  • Hi Fox4,

    This problem will happen when we deleted the default list New/Edit/Display Form web part on the original New/Edit/Display Form page. And this problem will persist even we reset the page, use the copy of the original form page or add a new list form web part to the original form page.

    Please try the following workaround:

    1. Create a new Display form page.
    2. Add following code within web part zone on the new page.
    <WebPartPages:ListFormWebPart runat="server" __MarkupType="xmlmarkup" WebPart="true" __WebPartId="{B73DB2B9-30FC-43B3-A2DD-DF7349A214F3}" >
    <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>listname</Title>
      <FrameType>Default</FrameType>
      <Description />
      <IsIncluded>true</IsIncluded>
      <PartOrder>1</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_427CC824_7312_4043_A9D8_07F555F4C8C9</ID>
      <ListName xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">{427CC824-7312-4043-A9D8-07F555F4C8C9}</ListName>
      <ListItemId xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">0</ListItemId>
      <ControlMode xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">Display</ControlMode>
      <TemplateName xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">ListForm</TemplateName>
      <FormType xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">4</FormType>
      <ViewFlag xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">1048576</ViewFlag>
    </WebPart>
    </WebPartPages:ListFormWebPart>
    

    This code is used to present the original display form web part. And please replace the _WebPartId, <Title>List Name</Title>, <ListName xmlns="...">List GUID</ListName>, <ID>GUID_REPLACING_DASHES_BY_LOW_DASHES</ID> properties to yours.

    3. Go to supporting files dialog, change the display form page to the new page.

    Or please see nparsee2's reply on this similar thread.
    http://social.msdn.microsoft.com/forums/en-US/sharepointcustomization/thread/ec118931-93c8-44fc-a936-b9cb5c9637ab/

    Thanks & Regards,
    Emir Liu
    TechNet Subscriber Support in forum
    If you have any feedback on our support, please contact
    tnmff@microsoft.com.


    Emir Liu

    TechNet Community Support

    • Marked as answer by Emir Liu Friday, March 23, 2012 2:41 AM
    Monday, March 19, 2012 5:16 AM

All replies

  • Hi Fox4,

    This problem will happen when we deleted the default list New/Edit/Display Form web part on the original New/Edit/Display Form page. And this problem will persist even we reset the page, use the copy of the original form page or add a new list form web part to the original form page.

    Please try the following workaround:

    1. Create a new Display form page.
    2. Add following code within web part zone on the new page.
    <WebPartPages:ListFormWebPart runat="server" __MarkupType="xmlmarkup" WebPart="true" __WebPartId="{B73DB2B9-30FC-43B3-A2DD-DF7349A214F3}" >
    <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>listname</Title>
      <FrameType>Default</FrameType>
      <Description />
      <IsIncluded>true</IsIncluded>
      <PartOrder>1</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_427CC824_7312_4043_A9D8_07F555F4C8C9</ID>
      <ListName xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">{427CC824-7312-4043-A9D8-07F555F4C8C9}</ListName>
      <ListItemId xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">0</ListItemId>
      <ControlMode xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">Display</ControlMode>
      <TemplateName xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">ListForm</TemplateName>
      <FormType xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">4</FormType>
      <ViewFlag xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">1048576</ViewFlag>
    </WebPart>
    </WebPartPages:ListFormWebPart>
    

    This code is used to present the original display form web part. And please replace the _WebPartId, <Title>List Name</Title>, <ListName xmlns="...">List GUID</ListName>, <ID>GUID_REPLACING_DASHES_BY_LOW_DASHES</ID> properties to yours.

    3. Go to supporting files dialog, change the display form page to the new page.

    Or please see nparsee2's reply on this similar thread.
    http://social.msdn.microsoft.com/forums/en-US/sharepointcustomization/thread/ec118931-93c8-44fc-a936-b9cb5c9637ab/

    Thanks & Regards,
    Emir Liu
    TechNet Subscriber Support in forum
    If you have any feedback on our support, please contact
    tnmff@microsoft.com.


    Emir Liu

    TechNet Community Support

    • Marked as answer by Emir Liu Friday, March 23, 2012 2:41 AM
    Monday, March 19, 2012 5:16 AM
  • Hi,

    just create page in the designer and add the custom list form and save it this might help you.


    Anil

    Monday, March 19, 2012 7:10 AM
  • Thanks for the comments.  In the end I restored a backup and aborted my updates.  I am aware of several of the approaches - basing the supporting files on the default content type, keeping/hiding the original listview when adding a custom listview, and getting/setting content type default forms in code.  None of these things worked.

    Now my problem is that I cannot change the current customized display form either programmatically or through SP Designer.  I can see the form url change in SP Designer or via a console app using the API, but the title link and ECB view items link still brings up the current form.  However, I can change the edit form via the API.

    I suspect something in the list definition is irreversibly corrupt and I will have to recreate the list.

    Thanks again for your help.

    Fred

    Monday, March 19, 2012 1:23 PM
  • Hi Fox4,

    The reason why you can modify the edit form page is that the original edit form web part has not been delete, and after you restore the original list display form web part, you should also be able to change the URL of display form page via the API.

    So please use above code to restore the web part first. We can recreate the original list form web part no matter in the original display form page or a new page. After that, we can hide the original list form web part in the display form page and insert a custom list form in the same page or create a new page with a custom list form web part and use this new form page as the default display form page (change it from supporting files). The list will work again from both title link and ECB view items link.

    Best regards,
    Emir


    Emir Liu

    TechNet Community Support


    • Edited by Emir Liu Tuesday, March 20, 2012 2:58 AM
    Tuesday, March 20, 2012 2:57 AM