For a customer I am upgrading their SharePoint 2007 enviroment to SharePoint 2010.
After a succesfull upgrade I am stuck with one last annoying problem: when creating a publishing site collection using a custom definition the provisioning of the site definition fails. Interesting about this is that the provisioning works from the
central admin UI, but this customer has an custom webpart for creating site collections in a web application outside of Central administration.
The simplified code for this is:
public static bool Create(SPWebApplication webApp, string Url, string siteTitle, string siteDescription, uint lcid, string siteTemplate, string ownerLogin, string ownerName, string ownerEmail)
SPSite site = null;
SPSite newSiteCollection = webApp.Sites.Add(Url, siteTitle, siteDescription, lcid, siteTemplate, ownerLogin, ownerName, ownerEmail);
site = GetRootSite(webApp);
bool r = (site != null) ? true : false;
if (site != null)
The exception is thrown when webApp.Sites.Add() is executed.
The user we are logged in as, as wel the appID, are Farm Admin's.
The ULS shows this exception:
Exception thrown while fetching field by internal name 'Wiki_x0020_Page_x0020
View Complete Post