Problem Migrating a WSP file from One Site Collection to Another

Copper Contributor

We recently moved our SharePoint capabilities from an on-premise SharePoint 2016 environment to SharePoint Online.  As part of our build, we create subsites from a custom template. The template has lists, libraries, and web parts but does not have documents or contents. 

 

In order to create our test environment we set up new "test site collections" and we downloaded the WSP file from our new production environment. The idea is to use WSP file in the test environment so that we do not have to manually recreate a site that we would later use to create a template in TEST. 

 

The first problem we encountered occurred when we uploaded the WSP to the solution gallery. We received the message/error below. 

 

This web template requires that certain features be installed, activated, and licensed. The following are blocking the application of the template:

 

EnhancedTheming Feature

SharePointHomeCache Feature

MobileExcelWebAccess Feature

 

This template can't be used for this site collection until the issues above are resolved.

 

Just as a note, we do not enable any publishing features in our site collections to avoid the template save problem.

 

Our IT team suggested that we run a PowerShell script to address the issue. We did NOT have to run this same PowerShell in the production environment, however, in production, we created the SharePoint site from scratch and saved it as a template (different process; we were not uploading the WSP).  After running the Powershell script we could then save the WSP file to the solution gallery and create a site using the uploaded template.  Our next step was to update a reference to a JavaScript file in the newly created site.  We then saved the site again as a template, but this time we encountered a new error -- essentially it told us that a content type was duplicated.  We then went into the site that we are using for the template and noticed that even though we have a "site" level content type, the site also has the same content type repeated but this time the duplicated content type lists a different parent -- the subsite name.

 

We also tried to remove the content type from the site and resave as a template, but that did not solve the problem -- we continued to see duplicate content types in any site we created from the template that originated from the migration.  

 

QUESTION:  Why does SharePoint apply the content type at the subsite rather than using the parent level content type (which led to the duplication).  We have followed a similar process in the on-premise SharePoint (we downloaded and uploaded the WSP file) and did not have to run the Powershell script, nor did we encounter the duplicate content type error.

 

 

 

0 Replies