Create Sites in SharePoint 2010 Fails

This was a hang-over from a sharepoint upgrade performed at a client site.

Each time the client tried to create a new site (i.e. sub-web) they would get hit with a correlation id and site creation failure, and the diagnostic log entries were:

07/27/2010 20:46:25.20 w3wp.exe (0x1364) 0x0590 SharePoint Foundation Runtime tkau Unexpected System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.Workflow.SPContentTypeWorkflowAssociationCollection.PushDownAssociation(SPWorkflowAssociation associationTemplate, Boolean bUpdateIfExisting, MethodBase mbChangeEntry) at Microsoft.SharePoint.Workflow.SPContentTypeWorkflowAssociationCollection.CopyWorkflowAssociation(SPWorkflowAssociation associationTemplate) at Microsoft.SharePoint.SPContentType.CopyWorkflowAssociationsTo(SPContentType ctDst) at Microsoft.SharePoint.SPContentType.SyncNewList(SPList list) at Microsoft.SharePoint.SPWeb.SyncNewLists() at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(String strWebTemplate) at Microsoft.SharePoint.ApplicationPages.TemplatePickerUtil.ApplyWebTemplateAndRedirect(S… 2d8cade4-075d-4327-9124-353123d11350
07/27/2010 20:46:25.20* w3wp.exe (0x1364) 0x0590 SharePoint Foundation Runtime tkau Unexpected …PWeb Web, String strWebTemplate, Nullable`1 bSharedNav, Boolean bOnTopNav, Boolean bOnQuickLaunch, Page page, Boolean bDeleteOnError) at Microsoft.SharePoint.ApplicationPages.NewSubwebPage.BtnCreateSubweb_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 2d8cade4-075d-4327-9124-353123d11350

There were two workflows attached to the Document content type that had not been migrated during the sharepoint upgrade from WSS to SharePoint Foundation 2010. These were now missing from the site collection, even though they were recorded against the content type. So when SharePoint 2010 created the site, it couldn’t apply the workflows to the files (such as default.aspx) within the site. This caused the creation to fail and SharePoint backed out and deleted the site it had just created.

They were no longer needed, so were removed from the site via:

  1. Site Actions, Site Settings (top-level)
  2. In the Galleries section, select Site content types
  3. Select your content type (in my case it was the Document content type)
  4. Select Workflow settings
  5. Select Remove workflows and click OK

This removed the association of the invalid workflows from the content type, and users could then create sites correctly.

Advertisements

One Response to “Create Sites in SharePoint 2010 Fails”

  1. Asad Ali Sandhu Says:

    thanks alot, really saved my hours…..
    🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: