The Office SharePoint Server Standard Web application features feature must be activated at the web application level before this feature can be activated. Event ID: 4965

 

I prepared a Microsoft SharePoint 2007 Farm environment as below order

  1. Windows 2008 Cluster installation and configuration
  2. SQL Server 2008 Edition installation and configuration
  3. SQL Server 2008 SP1 Installation on Cluster
  4. SharePoint 2007 With Sp2 installation and configuration
  5. SharePoint 2007 WSS base language pack installation
  6. SharePoint 2007 base language pack installation
  7. SharePoint 2007 SP2 WSS language pack installation
  8. SharePoint 2007 SP2 language pack installation
  9. SharePoint 2007 Jun 2009 cumulative update installation (WSS and Office Server)
  10. ASP.NET out of band Security Update Installation.

 

When I tried to create a publishing site collection, you face below error.

image

Obviously, I go and check features in web application and features are activated

 

image

I also noticed event ID 4965 in application eventlog.

The site template was not provisioned successfully. Delete this site collection in Central Administration, and then create a new site collection.
System.InvalidOperationException: The Office SharePoint Server Standard Web application features feature must be activated at the web application level before this feature can be activated.
at Microsoft.SharePoint.Publishing.PublishingResourcesFeatureHandler.<>c__DisplayClass3.<FeatureActivated>b__1()
at Microsoft.SharePoint.SPSecurity.CodeToRunElevatedWrapper(Object state)
at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()
at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)
at Microsoft.SharePoint.Publishing.PublishingResourcesFeatureHandler.<>c__DisplayClass3.<FeatureActivated>b__0()
at Microsoft.SharePoint.Publishing.CmsSecurityUtilities.RunWithWebCulture(SPWeb web, CodeToRun webCultureDependentCode)
at Microsoft.SharePoint.Publishing.PublishingResourcesFeatureHandler.FeatureActivated(SPFeatureReceiverProperties receiverProperties)
at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce)
at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, Boolean fForce)
at Microsoft.SharePoint.SPFeatureCollection.AddInternal(Guid featureId, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly)
at Microsoft.SharePoint.SPFeatureManager.EnsureFeaturesActivatedAtSiteInternal(SPSite site, String sFeatures, Boolean fMarkOnly)
at Microsoft.SharePoint.SPFeatureManager.<>c__DisplayClassa.<EnsureFeaturesActivatedAtSite>b__9()
at Microsoft.SharePoint.SPSecurity.CodeToRunElevatedWrapper(Object state)
at Microsoft.SharePoint.SPSecurity.RunAsUser(SPUserToken userToken, Boolean bResetContext, WaitCallback code, Object param)
at Microsoft.SharePoint.SPSecurity.RunAsUser(SPUserToken userToken, CodeToRunElevated code)
at Microsoft.SharePoint.SPFeatureManager.EnsureFeaturesActivatedAtSite(Byte[]& userToken, Int32 nZone, Guid siteid, String sFeatures)
at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId)
at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId)
at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(String strWebTemplate)
at Microsoft.SharePoint.Publishing.PortalProvisioningProvider.CreatePortal(String xmlFile, SPWeb rootWeb)

I suspected and check Central Administration Application Pool user account and checked its permission on Database but every thing was normal.

Publishing Site template was failing so I  did below steps

Copy  PublishingTimerJobs feature folder in the 12 hive folder from another environment to news environment

- executed following only once in farm
stsadm –o installfeature –name PublishingTimerJobs

- executed following against newly created web application
stsadm -o activatefeature -filename PublishingTimerJobs\feature.xml -url https://sites -force

It worked for me.

I hope it would work for you, if you face this issue.

Cheers,