Ok, I’ve run into this enough times, I figured I’d share it.
What
Today’s scenario was that I was using Metalogix Migration Manager (or rather, Content Matrix as it is now called) to move a SharePoint Site Collection to a new farm. During this move, SharePoint Publishing got, er, buggered, for lack of a better word.
My content came across, but no matter what I did, I could not, in the GUI or through tricks in SharePoint Designer (renaming libraries and other garbage suggested out there on the Interweb), I could not enable the SharePoint Server Publishing Infrastructure Feature.
So What
Well, this is a drag. I can’t have a pages library and layouts, I can’t use navigation and frankly, I don’t like my stuff ‘broken’ either. Just not cricket and not something I like to carry on with me like herpes, er, luggage. And, I don’t like to lose…
Now What
Here are some of the errors I encountered today, hoping Google helps others find this as well… Note, the errors below depended on what I was trying to do at the time (various other techniques that ultimately didn’t help):
Provisioning did not succeed. Details: Failed to provision all permission settings. OriginalException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
And
Failed to instantiate file “ContentQueryMain.xsl” from module “XSLStyleSheets”: The specified list does not exist.
Dude, What’s the Fix?
Note, I’ve come across this in both SharePoint 2010 and 2013 and suspect considering the Feature ID is the same, in 2007 this probably also applies.
- Take a Backup – I’m not responsible for your data, you are…
- Stop trying to click Activate in your Site Collection Features Admin for the SharePoint Server Publishing Infrastructure feature. As Einstein says, the definition of being a nut job is trying the same thing over and over and expecting the same result…
- Go to your SharePoint Server’s PowerShell and Deactivate Publishing for your site collection from the PowerShell command line and reactivate it. It will tell you that it wasn’t activated (gee, that’s what the GUI said too). But if you have ‘remnants’ of publishing kicking around, you’ll need to use the PowerShell equivalent to clean house and then reactivate it. Here goes:
To Deactivate
(Do it, you know you want to and will have to)
stsadm -o deactivatefeature -id f6924d36-2fa8-4f0b-b16d-06b7250180fa -url “http://yoursharepointurl/sites/sitecollection” -force
You’ll no doubt, if you came across this post, get a notice saying it wasn’t enabled… something to the effect of “”Feature ‘f6924d36-2fa8-4f0b-b16d-06b7250180fa’ is not activated at this scope”
To Activate
Ok, time to flip it back on
stsadm -o activatefeature -id f6924d36-2fa8-4f0b-b16d-06b7250180fa -url “http://yoursharepointurl/sites/sitecollection” –force
And Viola! It’s Activated
Now you can turn on your site publishing feature if you want your /pages library and Navigation should be back as well.
Hope this helps someone.
Sean
Funny, I’ll be the first to comment on this blog post. 😉
I’m no doubt going to be told that I could use PowerShell for this. And I’ve tried, but I haven’t had the same mileage in this goofy situation…
Just sayin… If you want to try the PowerShell equivalent, here you go:
Disable-SPFeature FeatureFolderName -Url “http://*url of site collection”
Enable-SPFeature FeatureFolderName -Url “http://*url of site collection”
I used PowerShell but found that if I didn’t include the -force attribute when enabling the feature, I still got the error.
Thanks.
It works to solve our problem.
Yes PowerShell should be the default option nowadays but true that some legacy STSADM “quick command” are doing the same so why not.
But guys should get used to PowerShell as it opens horizons a lot more.
@Heather: the force can be added to the cmdlet, just append
-force $true to Enable-SPFeature.
http://technet.microsoft.com/en-us/library/ff607803.aspx
You Rock.. I tried both the options Farm level and site level and then it worked..
I’ve been through this a dozen times on a dozen different farms and can tell you it affects all versions form 2007 – 2013. It’s usually the result of failed provisioning during the creation of a publishing site collection.
In many cases, it’ll be a dodgy Style Library. Delete this and recreate it as a standard document library with the same name, and you’ll be good to reactivate.
@Heather Macintosh, I was able to overcome this by using -name PublishingSite instead of -id xxxxxxxxxx. Good luck!
FWIW I got this error as well after I had foolishly renamed my /Style Library/ folder to /StyleLibrary/ using SPD 2013. Then I attempted to activate the SharePoint Publishing site collection feature and got the same error. I also noticed that SP had created a second /Style Library/. Deleting this second /Style Library/, and renaming the first /StyleLibrary/ back to /Style Library/, then activating the feature at the site collection worked. I was running SP2013 SP1 on Server 2012 R2, SQL 2014.
Any tips for SPO users? 🙂