So you wanna migrate from Ektron to Sitecore …
Your client has chosen to migrate from Ektron to Sitecore. How can the data be migrated?
In this series, I’ll describe the process that our team recently went through for migrating Ektron content to Sitecore without a content migration tool, without the Ektron API, but by diving right into the database.
Be sure to read the intro and Ektron database overview posts first.
About Our Project
Our assignment was to convert two Ektron websites to Sitecore; one ported over with the same look and feel as the existing site (Project A); the other, a complete redesign with the existing content (Project B). Throughout the blog series, I’ll reference the two projects as Project A and Project B.
NOTE: We worked with Ektron Version: 9.10 SP1 (Build 220.127.116.11).
There is alot of planning necessary when migrating content from one system to another. After deciding what is going to be migrated to the new system, a migration order must be established. In our project, much of the content was dependent on three areas: the media library, taxonomy list and the People business area. (The client is a law firm so its people are its primary asset and they are tied to other business areas of the site like events, articles, and blogs). So, in the case of both of our projects, taxonomy is imported first, followed by media library, followed by People.
Migration Tip #1 – Migrate a Legacy Content Id to each Sitecore item
When building the Sitecore templates, make sure to include a single-line text field to house the Ektron Content ID. This serves several purposes … it is used in migration to convert an Ektron relationship between two content items to a Sitecore relationship. Also, with this ID, you can confidently re-run your migration script as many times as necessary without concern of having duplicate content within Sitecore (by always searching for the content ID before creating a new Sitecore item).
Migration Tip #2 – Retain the Ektron database indefinitely
This is important if the client chooses not to migrate 100% of the content. Later, there may be a request to retrieve some unmigrated data. Create several screenshots of the Ektron content tree so that the client has a familiar view for picking out content that wasn’t migrated so you can target it by folder path. Then, use the content_folder_tbl’s FolderPath column to find the content.
Migration Tip #3 – Create a 301 redirect list while migrating
If your project is like mine, where several of the urls are changing, have an output of your migration be a mapping of old Ektron website url to new Sitecore website url and add these lists to your Sitecore Redirect Manager.
Migration Tip #4 – Update the Sitecore statistics with Ektron information
When saving imported content from Ektron, be sure to grab the admin fields for the Ektron content and update the __Created, __Created by, __Updated, and __Updated by fields. See the next blog post for details on the Ektron to Sitecore mapping.
Migration Tip #5 – Add the alternate text to images and the title text to links at migration time
Like Sitecore, Ektron allows you to set the alternate text of an image when the image is referenced on a page. Make sure to bring this over and if it’s not populated, suggest to the client that this is populated at content migration time with the image name (without the extension).
Migration Tip #6 – Fix the internal links in the rich text fields
Run your migration scripts a second time targeting the internal links that are in the rich text field. You can use the 301 redirect table from tip #3 to assist.
Migration and Helix
As mentioned in the previous post, we opted to access the database directly within our Visual Studio project.
I started with a new project in the Foundation solution folder to house the the Entity Framework connection and some base classes that would change infrequently.
In this solution, I installed Entity Framework via the NuGet Package.
This Foundation project contains the EktronContentEntities model and a BaseRespository.cs class, a base class from which all business unit specific repositories inherit. This contains the following:
- instantiation of the EktronEntities class
- pre-loading of the taxonomies from Sitecore
- optional pre-loading of People from Sitecore
- a simple method that pulled a list of items from Sitecore based on template from the index
- methods to get taxonomies and people by Ektron content id
Each Feature project that has migrated content has a Content Migration repository class that inherits from this BaseRepository class.
I outline the contents of this feature project in the next blog.
Check out all posts for this series: