Could not create publishing site


Cannot Create a subsite based on Publishing Site template or unable to enable publishing feature on a site.


Whenever we try to create a subsite based on publishing template or try to activate the publishing feature it fails with the following error:

Provisioning did not succeed. Details:
Failed to initialize some site properties for Web at Url: '<url>'
OriginalException: <nativehr>0x80070002</nativehr><nativestack></nativestack>

In ULS we see the following error

Failed to initialize some site properties
for Web

Url: '<url>'. Exception was: 'System.IO.FileNotFoundException:
(unresolved symbol, module offset=000000000000BBA9)

0x000007FEE9BBBBA9 owssvr.dll: (unresolved symbol, module

0x000007FEE9BE9A84 mscorwks.dll: (unresolved symbol, module

0x000007FEF3BDE757 (unresolved symbol,
module offset=00000000000DD779)

0x000007FEEC53D779 (unresolved symbol, module

0x000007FEEE52810E (unresolved symbol, module

0x000007FEEE4F54D2 </nativestack>   

 at Microsoft.SharePoint.Library.SPRequestInternalClass.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder)   

Microsoft.SharePoint.Library.SPRequest.GetMetadataForUrl(String bstrUrl, Int32
METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType,
Object& pvarFileOrFolder)   

Microsoft.SharePoint.SPWeb.GetList(String strUrl)   

Microsoft.SharePoint.Publishing.Internal.Store.GetListByUrl(SPWeb web, String


Above stack is quite generic and doesn’t really give any information about the specific file or the library that its looking for.


While trying to activate the features SP was looking for default lists and libraries that are created when we activate the publishing infrastructure feature on a site collection.


# Another symptom that we noticed while troubleshooting was the SharePoint Publishing Infrastructure feature was throwing the same error when we try to deactivate, which indicated that this feature which is dependent feature for publishing feature got some issue. To further narrow it down we tried deactivating the individual features one by one using powershell.

Disable-spfeature navigation -url -force Disable-spfeature publishinglayouts -url -force

Disable-spfeature publishingweb -url -force (activating on root site level)

Disable-spfeature publishingSite -url -force (activating on site collection

Disable-spfeature publishingresources -url -force -- this gave an error

Disable-spfeature publishing .xml -url -force

# It gave the same stack while deactivating the publishingresource feature, so now we have narrowed it down to this feature.

# Since stack was indicating some missing file, we resorted to comparing the libraries that gets created when we activate the publishingsite feature on a site collection.

# We found that on our ill-fated site following libraries were missing


2.Site collection documents

3.Site collection images

# We exported these 3 libraries using stsadm –o export –url and imported it on our site.

# Deactivated and activated the publishing infrastructure feature through GUI and bingo, everything started working as expected