SharePoint Publishing Feature activation failed


Last week I ran into an issue while reactivating the Publishing Feature on webs in a migrated (Dutch) site collection. If you have ever upgraded localized SharePoint 2007 Publishing sites this should sound familiar to you. What happens is that while in SharePoint 2007 the Pages library was called “Pages”, since SharePoint 2010 this is also localized to “Paginas” (Dutch), “Zeiten” (German), etc.

There’s an override property “__PagesListName” that is checked by SharePoint to get the correct list name in case it differs from what’s expected. And in case of data migrations it will be different (“Pages”) than expected (“Paginas”).

Microsoft has published a KB article (http://support.microsoft.com/kb/2484317) on it with a PowerShell script to set the override property. This fixes most issues with navigation not displaying correctly, but it seems that at least in SharePoint 2013 this still gives problems with Publishing Feature reactivation.

Publishing Feature activation failed. Exception: System.IO.FileNotFoundException: <nativehr>0x80070002</nativehr><nativestack>OWSSVR.DLL: (unresolved symbol, module offset=0000000000052B3E)

at 0x000007FF151F2B3E OWSSVR.DLL: (unresolved symbol, module offset=00000000000112BD)

at 0x000007FF151B12BD Microsoft.SharePoint.Library.ni.dll: (unresolved symbol, module offset=00000000000A3DA9)

at 0x000007FF15C33DA9 </nativestack>

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

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

at Microsoft.SharePoint.SPWeb.GetList(String strUrl)

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

at Microsoft.SharePoint.Publishing.Internal.AreaProvisioner.Provision()

at Microsoft.SharePoint.Publishing.PublishingFeatureHandler.<>c__DisplayClass3.<FeatureActivated>b__0()

at Microsoft.Office.Server.Utilities.CultureUtility.RunWithCultureScope(CodeToRunWithCultureScope code)

at Microsoft.SharePoint.Publishing.PublishingFeatureHandler.FeatureActivated(SPFeatureReceiverProperties receiverProperties).

The AreaProvisioner.Provision() uses a private field pagesListUrl which seems to be initialized to Microsoft.Office.Server.Utilities.PageUtility.DefaultPagesListName, which in turn reads its information from the localized “osrvcore“ resource value (C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\Resources)

image

image

Solution

I’ve experienced this issue in SharePoint 2013 with Service Pack 1 (15.0.4569.1000) but also November 2014 Cumulative Update (15.0.4667.1000). It may be fixed with any later CU but don’t hope on it.

One workaround would be to temporarily(!) change the value of List_Pages_UrlName in osrvcore.nl-NL.resx to “Pages”, (re)start the process that’s doing the Feature reactivation (powershell or IIS worker process), reactivate the Feature and retrace your steps as to undo the change (don’t forget the process restart). This will allow you to reactivate the Publishing Feature on those Dutch/localized migrated Publishing sites.

HTH

 


Links to this post

Comments

CAPTCHA Image Validation