When trying to deactivate the Publishing feature at the top level of our 2007 SP site collection (at the site and then the Infrastructure feature level) we see the following error:
Object reference not set to an instance of an object. at Microsoft.SharePoint.SPFeatureCollection.FeatureHasActiveDependants(Guid featidDependee) at Microsoft.SharePoint.SPFeatureCollection.DeactivateHiddenFeatureDependencies(Guid featidDependant, Boolean fForce) at Microsoft.SharePoint.SPFeatureCollection.Remove(Guid featureId, Boolean force) at Microsoft.SharePoint.SPFeatureCollection.Remove(Guid featureId) at Microsoft.SharePoint.ApplicationPages.DeactivateFeaturePage.LnkbtnDeactivateFeature_Click(Object objSender, EventArgs evtargs) at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
The feature does show as deactivated in the SP interface and does reactivate without issues but it doesn't fix there problems we're having with the publishing feature. (create page option missing and Site Navigation menu greyed out at the top level etc.)
To me this reads as it can't deactivate it properly as something else which depends on it is preventing this - we have many sites below the top level using the publishing feature, I hope this doesn't mean we have to deactivate all those too.
I have been reading this article but this particular error is not discussed but shows what others have tried.
My last hope at the moment is to try and force the deactivation and reactivation on the server via something like:
Stsadm -o deactivatefeature –name PublishingWeb –url URLHERE -force Stsadm -o activatefeature -name PublishingWeb –url URLHERE -force
I'm not sure what the full implications of this are on our current content though, some who have tried this have reported no issues and that it has fixed this publishing feature issues, but we're having to do this on a live environment (long story) - any advice appreciated concerning this error and experiences resolving this.