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);