SharePoint 2013 Workflow Manager does not allow a user to create a new SharePoint 2013 workflow in a site or site collection migrated using Content Matrix. The SharePoint trace logs (ULS logs) show errors similar to the following:
Error: Original error: Microsoft.SharePoint.SPException: The URL 'wfsvc/f756d15d66eb4d3f899d891ab94e2343/workflow.xaml' is invalid
SQL error code from last error 8143 - Parameter '@tp_Author' was supplied
The issue is caused by the NoCrawl property of the "Author" column (tp_author), specifically when that value is set to 'False' for the 'FromBaseType' attribute. This value should be set to 'True'.
Below is a PowerShell script that may be used to resolve the issue:
if((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $null)
{
Add-PSSnapin Microsoft.SharePoint.PowerShell;
}
$url = 'https://site.url.com'
Disable-SPFeature -Identity Fields -url $url -force
Enable-SPFeature -Identity Fields -url $url
$Site = get-spsite $url
foreach ($web in $site.allwebs)
{
$lists = New-object System.collections.arraylist
$web.Lists | % { $lists.add($_) } | Out-Null
foreach ($list in $Lists)
{
$AuthorField = $list.fields.getfieldbyInternalName('Author')
if ( $Authorfield.schemaXML -notmatch "FromBaseType" )
{
Write-host $web.url $list.title -Separator `t`t
$xml = [xml]$AuthorField.SchemaXmlWithResourceTokens
$xml.Field.SetAttribute('FromBaseType','TRUE')
$AuthorField.SchemaXml = $xml.OuterXml
$AuthorField.Update()
}
}
}
$Site.Dispose()
Note: This will only fix the Workflow Manager issue if the ULS logs show "SQL error code from last error 8143 - Parameter '@tp_author'".