Have you ever tried to enable the publishing feature on a SharePoint site after it has been created using a site template that didn’t enable it when the site was created? You navigate to the site features page (Site Actions -> Site Settings ->Modify All Site Settings or Site Actions -> Site Settings) and try to activate publishing.
Seems like it should be an easy task huh? You just click the activate button and away you go…nope. SharePoint will tell you that you need other features to be activated to make this work.
Now you ask yourself, "Where does this other feature live?". This feature is located at the site collection feature level. In order to find it, you have to navigate to the root site in your collection and select "Site Collection Features" from the Site Settings page (Site Actions -> Site Settings -> Modify All Site Settings).
There it is in all of its glory, the elusive Publishing Infrastructure feature. But like the elusive dodo bird, it is not so easy to catch. When you try to activate this feature, you get another screen stopping you in your tracks.
A closer look at the SharePoint logs will reveal an error that looks something like this:
Event log message was: ‘Failed to provision the scheduling job definitions. Page scheduling will not succeed.’. Exception was: ‘System.Security.SecurityException: Access denied. at Microsoft.SharePoint.Administration.SPPersistedObject.Update() at Microsoft.SharePoint.Administration.SPJobDefinition.Update() at Microsoft.SharePoint.Administration.SPWorkItemJobDefinition.Update() at Microsoft.SharePoint.Publishing.Internal.RootProvisioner.<>c__DisplayClass5.<AddSchedulingJobDefinitions>b__4() 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.Shar…
Looks like we have a permissions problem with some of the timer jobs needed for the publishing infrastructure.
My understanding of this is that in order to schedule these jobs, the user performing the action must have access to the farm configuration database. Most likely you site collection administrators will not have those permissions since they are not farm administrators and that is why the feature activation from the SharePoint site is failing.
The safest way around this issue is to have a farm administrator log into one of the web front end boxes and run the following commands:
These commands assume that the stsadm.exe location is part of your computers path environment variable. A good explanation of how to do this can be found here. The default path for stsadm.exe is C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12BIN. You’ll need this path when you go to modify the path environment variable.
After running the first command, your Site Collection Features screen should look like this:
If it doesn’t, just hit the "Activate" button and the feature should activate.
After running the second command, your Site Features screen should look like this:
If it doesn’t, just hit the "Activate" button and the feature should activate.
The "Publishing" feature will have to be activated individually on each that you wish to use publishing for, unless that site is created from a site template that lives under the "Publishing" tab in the site creation screen. All of those templates automatically enable the publishing feature.
Please let me know if you have any issues with this. As with all things SharePoint, there can sometimes be multiple ways to skin a cat.