Our site has several existing 'identical' content types. I'd like to consolidate this situation so that all of pages these content types are reassigned to one destination content type.
using EPiServer.DataAbstraction.Migration;
namespace MyProject.Migrations
{
public class MigrationStep_Consolidation : MigrationStep
{
public override void AddChanges()
{
ContentType("DestinationPageType")
.UsedToBeNamed("DuplidatePageTypeA");
ContentType("DestinationPageType")
.UsedToBeNamed("DuplidatePageTypeB");
}
}
}
All of the above Content Types already exist and are being utilized by existing pages. The above code generates the error:
021-12-15 19:38:44,371 [1] ERROR EPiServer.Framework.Initialization.InitializationEngine:
Initialize action failed for 'Initialize on class EPiServer.Initialization.Internal.ModelSyncInitialization, EPiServer, Version=11.20.8.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
EPiServer.DataAbstraction.ConflictingResourceException:
There is already a content type registered for type: MyProject.Pages.DestinationPageType
Is it possible to use a MigrationStep to do this? Is there a better way to do this without recreating the entire pages?
Our site has several existing 'identical' content types. I'd like to consolidate this situation so that all of pages these content types are reassigned to one destination content type.
All of the above Content Types already exist and are being utilized by existing pages. The above code generates the error:
Is it possible to use a MigrationStep to do this? Is there a better way to do this without recreating the entire pages?
Thanks in advance.