When viewing the Workflow settings on a Document Library, the following error might occur:
"User cannot be found."
Additionally, the following error can be found in the ULS logs:
SharePoint Foundation Runtime Unexpected Microsoft.SharePoint.SPException: User cannot be found. at Microsoft.SharePoint.SPUserCollection.get_Item(String loginName)
Locate the Workflow with the invalid user information and then manually re-publish it.
- Run a SQL server profile trace - there should be an indication of a location where the problem occurs, for example: _catalogs/wfpub/Approval - SharePoint 2010',@LeafName1=N'ReviewApproval_1033.xoml.wfconfig.xml
- Use SharePoint Designer to open the workflow file that is implied to exist by the .xoml.wfconfig.xml file extension. Browse to (in this example) _catalogs/wfpub.
- Find the workflow files that are present and attributed to a deleted user and while logged in with a current, valid user, check them out then chec them in to update the "modified by" property.
- You should now be able to browse to the pages that were previously producing errors.