Direkt zum Hauptbereich

Custom list NewForm.aspx ruined, lost or deleted in WSS 3.0



My problem: I "accidently" deleted the NewForm.aspx and then I got the errors:

If you click New to create a new item in the list, you receive the following message:
Invalid page URL:
If you click an existing item in the list, you receive the following error message:
An unexpected error has occurred

I had a backup copy of my NewForm.aspx, but it did not work to just put it back into place.

(see also here: http://support.microsoft.com/kb/935504)

I also had the field "new item form" in list properties empty (see image) and I could not fill the value. Whenever I saved a change it was empty again, when I called the properties again.

Here I found my rescue:



To view the original information: http://blogs.msdn.com/dszabo/archive/2007/02/20/custom-list-newform-aspx-ruined-in-wss-3-0.aspx

This is just to keep the information in case Davids page might be unavailable:

1. Open NewForm.aspx and EditForm.aspx in Sharepoint Designer

2. Copy the code for the ListFormWebPart control from the EditForm.aspx. The code in question reaches from

down to


3. Paste it into the broken NewForm.aspx, I pasted it right below the Line:


4. Within the pasted lines of code look up the lines starting with
< ControlMode
and
< FormType
In the "Control mode" tag replace the "Edit" with "New", in the "FormType"-Section replace the digit "6" with "8".

5. Before saving, you have to generate a new GUID for the pasted control in your NewForm.aspx otherwise your EditForm.aspx will be broken after saving!!!

There are online GUID generators on the internet so you don't need Visual Studio, e.g.:

http://www.somacon.com/p113.php

Generate a new GUID and asign it to the "__WebPartId" attribute in the very first line of code of your control:

< WebPartPages:ListFormWebPart runat="server" __MarkupType="xmlmarkup" WebPart="true" __WebPartId="{YOUR_NEW_GUID_HERE}" >

6. Look up the -Tag further below (it was about 27 lines below in my case) and change a random number in the ID, e. g.
Before: g_092cc5f1_f97c_408b_bf66_c7b235af38f9
After:
g_092cc5f1_f97c_408b_bf66_c7b235af38f5

7. Save your work...and your done!

Addition by me: After this rescuing I got two ListFormWebParts in my Form - the old one and the new one. I just deleted the old one and everything was working again.

Kommentare

Beliebte Posts aus diesem Blog

How to delete WebSEAL servers which have not been configured correctly.

Problem: The WebSEAL server list in the pdadmin: pdadmin> server list shows the server, but it does not exist anymore, i.e. because the host has been disassembled without unconfiguring the WebSEAL instance. Solution: 1.) Delete the instance in the LDAP under: SecAuthority=Default - cn=securitygroup - cn=webseal-servers - cn=secmgrd-servers 2.) Configure the instance again, which will lead to an error, because it seems to be installed already. Configuring WebSEAL instance 'DO-06'...HPDMG0453E A server with the same name already exists.DPWCF0473E The WebSEAL instance 'DO-06' failed to configure. 3.) Unconfigure the instance, which will show errors, but remove the instance totally. # amwebcfg -action unconfig -inst_name DO-06 -admin_id sec_master -admin_pwd ********* Unconfiguring WebSEAL instance 'DO-06'... 2008-10-28-15:30:10.158+01:00I----- 0x389D51F2 amwebcfg ERROR wcf Error WebCfgAdminApi.cpp 84 0x002198d0 DPWCF0498E The user 'DO-06-webseald/srv1252...

Error: HPDMG0764E An internal error has occurred. (status 0x14c012fc)

Error: HPDMG0764E An internal error has occurred. (status 0x14c012fc) pdadmin sec_master> user create dg1234 uid=dg1234,cn=team1,cn=users,o=company lala lala ********** Could not perform the administration request Error: HPDMG0764E An internal error has occurred. (status 0x14c012fc) Description: After the upgrade from Policy Director (policy server) V5.1 to V6.0 the errors above occured when trying to write to the registry. Solution: The task of updating the ldap schema did not work well for some reason. After doing it again the errors did not occur again: # ivrgy_tool -d -h ldap_host -p port -D ldap_admin -w pwd schema