Lucy de Boer
 

Object reference not set to an instance of an object with custom workflow

23

May

A few months ago I was experiencing a rather annoying bug, a ‘Server Error in '/' Application’ when using my custom workflow on a publishing pages document library in MOSS 2007. The issue was: If my custom workflow is applied to a publishingpage, when the user enters the document library and selects ‘Edit Properties’ or opens the page for editing the server error pasted below occured. When check out is disabled on the document library the error does not occur when editing properties, However the user still cannot edit the page through ‘Edit Page’. The user can check in and check out the page without any problems.

After some testing I noticed this error occurs with any custom workflow, even the samples provided in the ECM Starter Kit so I figured the problem cannot be my code. A very similar error (Value cannot be null. Parameter name: s) also occurs when using the standard provided ‘Disposition Approval’ workflow, the stack trace of these two are almost identical:

Stack Trace snip:

[NullReferenceException: Object reference not set to an instance of an object.] Microsoft.SharePoint.Publishing.Internal.WorkflowUtilities.GetAssociationDataValue(CachedWorkflow workflow, String xmlNodeName) +124
M
icrosoft.SharePoint.Publishing.WebControls.ConsoleDataSource.EnsurePageNotInLockingWorkflowIfInEditMode() +121
Microsoft.SharePoint.Publishing.WebControls.ConsoleDataSource.LoadDataSource() +150

 

Here’s a screendump of the full Error (click to enlarge):

After discussing the issue with Microsoft and placing a call, yesterday the final answer came through in the form of a hotfix, related to KB Article Number 933819. The knowledgebase Article seems to be taken offline but yes! It is the answer. I applied the hotfix to my server and instantly the error has disappeared. My workflow is working beautifully now.

So, if you are experiencing the same bug, give Microsoft Support a call and mention KB 933819.

Lucy de Boer schreef

Comments (6)

Lucy de Boer

Zoeken

Categorie

Archief


Sign In