1

I'm using SharePoint 2016 On- premises server.

From site collection ( Farm A) I've saved a site as a site template and uploaded the file in the solutions of site collection (Farm B), and activated it. Now I wanted to create a new sub-site using that activated solution. While doing so I'm getting errors mentioning that those features are not activated and hence I can't create a site.

On analyzing the error, I've activated the some features and reduced the error count,

Finally, I can't clear one error, because that one feature is not listed in the site collection(Farm B) features.

To solve the issue, I need to copy (from Farm A) and paste (to Farm B) the same site collection feature.

Please suggest a way to copy the feature from one site to another.

Error while creating the sub -site : enter image description here

1

You can find the MissingFeature in Farm A under this location (for CompatibilityLevel 15)

%Program Files%\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\FEATURES\<FeatureName>

Copy this folder to the corresponding path in Farm B, then install the missing feature in Farm B by executing

Install-SPFeature -path "<MissingFeature>"  -CompatibilityLevel 15

Check the status of the feature by executing

Get-SPFeature -Identity "<MissingFeature>"

Reference: Install-SPFeature. Get-SPFeature.

| improve this answer | |
  • thanks for helping me , your solution working, but I've found the feature in folder 16 not in 15, however I've copied and pasted in the folder 15 in Farm B, and activated it. – Jegan Baskaran Apr 24 at 4:35
  • Now I'm able to see the feature Farm B , but i'm unable to create the site, I'm getting an error, I've attached the error screenshot in my question, can you please check and let me know what went wrong – Jegan Baskaran Apr 24 at 4:37
  • @JeganBaskaran The error suggests that there is a site content type that has invalid name in the site template you are using. Navigate back to the site collection in Farm A and find the issued content types, manually rename them, then save the site collection as a template again. See the reference here: mstechblogs.com/paul/… – Chelsea_MSFT Apr 24 at 8:48
1

You can get the problematic feature details from the site collection A using the below command:

Get-SPFeature | Where {$_.DisplayName -eq "FeatureName"} | Select ID

Then activate that feature in Site Collection B using the below command:

Enable-SPFeature –Identity "FeatureName" –url http://YourSiteCollection-B-URL

Then, create the subsite using the custom template from Site Collection - B.

Modified Answer:

If you have custom features in installed in your dev server - you can export those solutions using the below script:

$dirName = "c:\Solutions"
foreach ($solution in Get-SPSolution)
{
    $id = $Solution.SolutionID
    $title = $Solution.Name
    $filename = $Solution.SolutionFile.Name
    $solution.SolutionFile.SaveAs("$dirName\$filename")
}

Source:

Export all Farm Solutions (WSP) from central admin with PowerShell in SharePoint:

Then - verify your "Web Server Extensions\15\TEMPLATE\FEATURES\" with the wsp name in your dev server - then deploy your all downloaded WSP solution to the prod server - then activate the feature in your site collection - Finally verify the "Web Server Extensions\15\TEMPLATE\FEATURES\" both in dev and prod server - if both are same, you are good to go.

| improve this answer | |
  • Thank you so much for replying, I 've modified my question a little, Apologize for the confustion. Acutally i want to copy the feature from a site to another site which is a different farm. simply we can from Dev environment to Production – Jegan Baskaran Apr 22 at 9:43
  • Please provide a solution for copying a feature at Farm level – Jegan Baskaran Apr 22 at 9:45
  • Hi @JeganBaskaran - you can check the modified answer now. – Habibur Rahaman Apr 22 at 12:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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