1

I am having a situation where I need to manage single feature for multiple site collections in a farm environment. Situation is as described below.

Assume,

  1. I will create 3 web applications and for each web application there will be corresponding site colection(assume site A,site B,site C)
  2. There is a feature named "Base".
  3. Base feature has 4 lists (a,b,c,d). The list "a" has few items (x,y,z). Basically it will be in feature folder present under 14 hive
  4. Now I will activate this on site A.
  5. Now I want to do some changes to same feature by adding few more lists and will change the contents of the list "a". This one I want to activate on site B
  6. If I try to reinstall the feature, it will overwrite the old one.

My question is, will it affect on site A on which we have activated the old feature?

Is there any good way to achieve this?

1
  • Since the answer could greatly depend on how you define your feature, could you please add some more info about the desired outcome? or are you just wondering how SharePoint handles changes to existing/deployed features? Commented Jul 8, 2014 at 12:57

2 Answers 2

2

My question is, will it affect on site A on which we have activated the old feature?

The answer is no. Let's say you developed a custom feature F1 which has version 1.0. This is deployed on the farm to all web applications, and activated in site collections where needed.

Site collections will have a feature reference that F1 v1.0 is activated in that site collection.

Now, you add new stuff to your F1, and bring its version to 1.1 You deploy the solution containing the new version by using Update-SPSolution cmdlet (important)

All site collections having F1 v1.0 activated won't be affected, and will still hold the information that F1 v1.0 is activated. In order to upgrade F1 to v1.1 in site collections where v1.0 is active, you'd need to retrieve the feature from SPSite (or SPWeb) object, and explicitly call Upgrade method on it. This will upgrade the feature to new version in that specific site collection, and run the feature upgrade actions you'd prepared while changing your feature definition in Visual Studio. If a new site collection (site D) would activate F1, after Update-SPSolution has ran, it will activate and get everything in v1.1 version.

I suggest you to go a bit further into Feature Upgrading mechanism of SharePoint. This is a good starting point: http://msdn.microsoft.com/en-us/library/office/aa544511(v=office.14).aspx

0

It will not affect the Site A unless and untill you deactivate and activate the feature again. Feature affect the site, when you change it state, means if the feature is not available in a particular site and you activate the feature, it will execute the Feature Activastion function and install the changes in the site. If the site already have the feature, then you need to deactivate feature first and reactivate it again to take the effect in the site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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