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

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

WebSphere Application Server LDAP: The administrative user ID does not exist in the user repository.

When you try to enable global security with ldap authentication you get the following error when configuring your ldap repository (IBM Directory Server): The administrative user ID does not exist in the user repository. Reason: The bind user must be searchable. This means that an ldapsearch with this user as bind user must return his own entry. If this does not work, you have to add an aclEntry: vi change-was7101-aclentry.ldif dn: uid=was7101,cn=mygroup,cn=admusr,o=mycomp aclentry: access-id:UID=WAS7101,CN=MYGROUP,CN=ADMUSR,O=MYCOMP:normal:rsc $ ldapmodify -h myhost -x -D "cn=root" -w ******* -f change-was7101-aclentry.ldif modifying entry "uid=was7101,cn=mygroup,cn=admusr,o=mycomp" Now user was7101 can do an ldapsearch to find itself and therefore you can use it to configure you LDAP repository. This article gave me the hint: http://www-01.ibm.com/support/docview.wss?rs=767&uid=swg21219253