I am working on a custom list for Sharepoint WSS. This involves creating a custom master which applies only to the new entry form for the list. This by itself has its own issues. You might think you can simply just change the name of your master from “default.master” to “custom.master” wouldn’t you? Well partner, that is where you would be wrong. Looking for a quick fix I just used a relative path as noted at the link. So I ended up with something like:
This leads me to where I started having a problem. I am running Vista in a virtual machine via VMWare Fusion and I have Unity enabled. As I was tabbing back and forth somehow some of the code in my newform.aspx page got deleted. I didn’t catch it till it was saved and I had reloaded the browser. This is when I was presented with a white screen with nothing on it, no error, no nothing. Weird… Sharepoint is usually pretty good about bitching about errors.
So I tried to undo any changes to the file and resave. Well naturally Sharepoint Designer didn’t have any undo states (does this feature ever work properly in SPD?!). I reset the file to the site definition so I could get back on my merry way.
I try to add a new item to the list so I could confirm the file was working again. But wait, what is this? Invalid page URL??! WTF?
Yes folks, that’s right. Even if you replace the code that was accidentally removed the list has been completely hosed. You are screwed…. yes Microsoft has some official word on it and it isn’t pretty. If you have the misfortune of accidentally deleting the List Form Web Part from your NewItem.aspx page it is time to hit the big shiny red button and nuke that sucker from orbit.
Just remember Microsoft’s handy advice:
To resolve this issue, delete the list, and then re-create it. Then, customize the NewForm.aspx page. When you customize the NewForm.aspx page, make sure that you do not delete the List Form Web Part.
This roughly translates into “Our product suffers from a catastrophic failure if you remove some code temporarily from a web page”.