Send mail to the author(s) E-mail

View Richard Soeteman's profile on LinkedIn

RSS 2.0 | Atom 1.0 | CDF




The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Sign In


# Wednesday, August 21, 2013
Wednesday, August 21, 2013 11:11:52 AM (GMT Daylight Time, UTC+01:00) ( CMSImport | Umbraco )

This Blog is not active anymore, further posts will be available on my company website. Read new posts here

CMSImport PRO always had support for uBlogsy. When testing the latest version of uBlogsy I found that it was completely different from the V2 version. The latest version of CMSImport PRO (2.4 and above) support version 3 also. The version 2 version of uBlogsy was easier to use from an Import point of view. Most relations to authors etc were stored as comma separated values. This is changed to MNTP now. So thanks to uBlogsy, CMSImport supports lookups for MNTP now :). But as mentioned above there are a few steps you need to do to import content in uBlogsy, so in this blog post I try to explain the process form importing all data from a Wordpress file (thanks Morten for sending me one).


First we need to install uBlogsy V3 and CMSImport. In this post I’ll be importing the comments also, therefore I need to install uCommentsy (the new commenting system for uBlogsy that is not in out of the box)also. From version 2.4 of CMSImport not all Data Adapters are included in the core package anymore, this is to avoid a large list of available adapters that most people don’t use. So to import Wordpress data we need to install the additional CMSImport.DataAdapters.Wordpress package also. Before starting CMSImport make sure you have your license file in the bin folder of your Umbraco installation also.

uBlogsy is using MNTP for assigning authors and Labels (Categories in Wordpress). The XPath configuration gave me some issues when using uBlogsy. It couldn’t find the rootnode when editing posts.  By default the xPath configuration is searching from the current node as you can see in the image below.


This might be ideal when you run multiple blogs with multiple authors and labels but for my situation selecting all authors and categories works fine and is then always available in the post. To change the xpath configuration open the following datatypes and update the xpath.

DataType XPath expression
[uBlogsy] [MNTP] Author Picker //uBlogsyContainerAuthor
[uBlogsy] [MNTP] Label Picker //uBlogsyContainerLabel

Before importing the posts we first need to import author, categories and tags data. CMSImport can use this data for lookup values and assign the values during the import of Blog posts.

Import meta information

CMSImport will automatically assign meta information such as Author, Labels (Categories in Wordpress) and  Tags. This will be based on a lookup value, when CMSImport can find the related node it will assign it to the Blog post otherwise it will be ignored. So the first thing we need to do is import the meta information. When you open CMSImport and select import data you should use the following data adapters to import the meta information:

Data adapter  
Wordpress Authors Imports authors from a Wordpress export file
Wordpress Categories Imports the labels from a Wordpress export file
Wordpress Tags Imports the tags from a Wordpress export file

When you hit next for any of the above Data Adapters you need to select a location. Below the example for authors, tags and labels work the same. You will also see that the document type is automatically assigned. This is because CMSImport knows that uBlogsy is installed. Also the mapping is automatically assigned correctly. So after assigning the location you can hit next a few times and the Meta information will be imported.


Importing blog posts

Ok we are coming to the real task, importing the blog posts. This the same as importing the meta information. First you select Wordpress blog posts as the datasource. Then select Blog as the root to import the data. uBlogsy will automatically create the date folders  when you are importing. Also the mapping is created automatically. When you import the data the meta information will be assigned automatically. After importing the data save the Import definition, we need it again when importing the comments. After the import definition the  post info tab of a blog post  should look similar as the image below. Author, tags and label info is assigned automatically.


Importing comments

The last step is importing comments. This is a bit different from importing the above information. To import the comments, open the CMSImport saved imports tree for content. Right click on the saved import definition for posts and select Create child definition and select Wordpress comments as the data source. You don’t need to pick a location on the next step. CMSImport will find the location based on the imported posts. All other steps are exactly the same as importing the other data.


Once the data is imported your tree should look something like this.


That’s it

That’s all you need to do to import Blog posts and comments from a Wordpress site into uBlogsy 3 for Umbraco. If your Wordpress file contains pages also you can use the Wordpress page data adapter to import the page data as well.  This article can also be used if you have BlogML data, replace Wordpress with BlogML adapters and all should work.

Happy importing!