Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've been asked to Hide the Publishing Feature for the farm in Sharepoint 2007.

Now I can go on the file system and change the feature definition but as we all know messing about on the 14 hive with files that dont belong to you is a nono.

I can't remember, probably because you can't do it, if it is possible to hide a feature, especially one that doesn't belong to you or can publishing just be removed ?

<Edit> By removed I mean Hidden, not deactivated or uninstalled </Edit>

If anyone can tell me if it's possible in another way to editing the file great, if you know its impossible a link to the WhitePaper that says don't be so stupid would also be good.

share|improve this question
add comment

4 Answers

up vote 1 down vote accepted

Have a look at the Zevenseas Feature Blocker.

share|improve this answer
    
I have to mark this as my answer, whilst the others all had great points this even points to an article that explains whats going on so I can just imlpement part of the solution instead of all of it. I recommend everyone take a loko at this, ControlAdaptors Whose ever heard of them! –  BinaryJam Apr 14 '11 at 14:59
    
I tried this on my system and could not get the WSP to work out the box, I did install it to all webs (else the file system changes would not replace the App_browser files obviously) but nothing appears in the list of features. The theory sounds great but I cant get this solution working on my rig, it might be fine for others, worth a try at least. –  BinaryJam Apr 18 '11 at 13:53
add comment

Could you not have a hidden feature of your own that would set the Hidden property to True on an instance of SPFeatureDefinition relating the Publishing Features?

Get this: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebapplication.features.aspx

Get the SPFeature that you want, then set the SPFeature.Definition.Hidden property to true.

Not sure how well this would work, worth a shot though. Try it in a Console app first.

share|improve this answer
add comment

There is an attribute of the feature element that enables you to make it "hidden", which means it doesn't appear in the user interface, which is what you are looking for. But that is intended for when you are creating your own custom features, particularly for feature dependencies where it doesn't make sense to activate a particular feature on its own.

You could probably hack the publishing infrastructure and publishing features XML in the SharePoint Root Folder (trying not to call it the "14 hive") but it would be a really bad idea for a number of reasons.

share|improve this answer
    
Yes that is what I meant by hacking files on the system. Really bad is also what I thought. But I specifically need the WhitePaper so I can shove it in peoples faces and say - "Nooooo Stupid!" –  BinaryJam Apr 14 '11 at 14:04
add comment

First of all you are right, one should not mess with 12 hive in SharePoint 2007 (14 hive is the name of same folder in SharePoint 2010).

In SharePoint 2007 you can deactivate/uninstall feature via STSADM deactivatefeature command and STSMADM uninstallfeature command. But when it comes to Publishing infrastructure, as it is built-in feature I would not deactivate it as there might be other features that require this feature in order to function properly. I cannot recall now if it was Publishing, but I have seen some broken SharePoint farms when people attempted to make some uncommon modifications.

share|improve this answer
1  
The Publishing Infrastructure adds some great functionality, I'd rather see it stay around in a deactive state than have it disabled altogether. –  PirateEric Apr 14 '11 at 13:53
    
Yup, my point exactly. –  Toni Frankola Apr 14 '11 at 13:53
    
It's not active on many sites so de-activating won't do anything to Hide the feature to prevent Site Admins activating it. Should have said "Dont want site admins activating it" –  BinaryJam Apr 14 '11 at 14:06
    
There is also uninstall command... Updated. But I do not understand the question here, you want to just hide not uninstall? What's the reason here, who want's this? –  Toni Frankola Apr 14 '11 at 14:10
    
Yes the requirement is Hide not uninstall, and besides uninstalling publishing would be far far worse then editing the feature def file and setting it to hidden. As for who wants it, the customer wants it. The customer may be an idiot, mis-informed, deluded or many of these things but they pay the bill and don't want site admins enabling publishing. –  BinaryJam Apr 18 '11 at 13:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.