Manage Form Templates Errors w/ “Unknown Error”
Posted on October 16, 2008 - Filed Under Life
Much thanks to Tom Kretzmer who first published the issue and his fix.
Also, I’m going to snipe his disclaimer:
`No warrantees, express or implied, are granted with this information. Please note that this information is FREE and me being nice enough to give it to you does not mean that you should do anything with it, and that it won’t do anything horrible to your systems. Above all, I’m not liable for what you choose to do with it.
As a matter of fact, THIS INFORMATION HAS THE CAPABILITY OF RUINING YOUR INFRASTRUCTURE AND COSTING YOU UNTOLD MAN-HOURS, MONEY, AND DOWNTIME. APPROACH WITH CAUTION.
So yesterday, one of my coworkers told me the ManageFormTemplate.aspx in Central Admin had hosed.. All we were getting was “Unknown Error”. So after turning on debug and turning off the generic SharePoint error pages… I got the “object reference is not set to an instance of an object”.
Crap. Something in the DB isn’t quite right. So I found Tom’s post… yep a form has a nasty artifact (or lack there of in the config db). Fantastic. So I confirmed with my coworker and he tried to deploy an admin approve form when the SPTimer hosed.. he ended up deleting the solution but something of it remained.
Below is how I fixed it. Bare in mind I had to step through EVERY SINGLE FORM TEMPLATE to find the one that had throw the exception when looking at the FormTemplateStatus property and delete it. I knew that this form was not deployed to any sites, so I didn’t have to traverse all my sites in my farm and delete it there.
Below is the code..
SPFarm Farm = new SPFarm();
FormsService FS = new FormsService();
SqlConnectionStringBuilder connectionString = new SqlConnectionStringBuilder(“Data Source=<YourSQLServerHere>;Initial Catalog=<YourConfigDBHere>;Integrated Security=True”);
Farm = SPFarm.Open(connectionString.ToString());
try
{
FS = Farm.Servers.GetValue<FormsService>(FormsService.ServiceName);
foreach (FormTemplate form in FS.FormTemplates)
{
//form.FormTemplateStatus.ToString();
//form.Delete(); — THIS WILL KILL YOUR SERVER IF YOU ARE STUPID ABOUT THINGS
}
}
catch(Exception ex)
{
Console.WriteLine(ex.Message);
}
Have a Job that is stuck in “Getting Queued”?
Posted on September 15, 2008 - Filed Under Life
(As in you’ve tried to check in a project 8 times, and 7 jobs are currently queued w/ 1 job “Getting Queued”)? You have yourself a nasty clog there. Don’t bother going to the queue settings. What you need is right infront of your nose. In Manage Queue Jobs, expand the Advance Options section, select Cancel Jobs getting enqueued and kill your clog.
Link Item is missing from Issues list? Read me.
Posted on September 10, 2008 - Filed Under Life
This has just happened to my client. They setup a fresh MOPS instance on their production MOSS box. They began to test and quickly realized that the Issues list on all project workspaces were missing the Link Item and upon further investigation.. missing the Link column (of type Project Link ). You’re left scratching going “huh???”
Go here. Now. Thanks Brian.
Now you’re left trying to politely explain why the Fab 40 isn’t a good thing…
keep looking »