A new era

After about 5 years I had the urge to move on – concerning my current blog. All these years Zope/Plone served me very well, but I just couldn’t really keep up with maintaining Plone and paying the attention it deserved. Also update to newer versions started to be a pain, and I just could afford the time to get new features in place.

OK – so this was the starting point to look for a new home; and here we are now. WordPress offered a lot of what I wanted from a blog-system, so I though – hell, give it a try.

The Migration

The worst thing about moving to WordPress was getting all of my existing content over. So I had to get about 170 blog posts and several other posts out of the Zope-Database and into WordPress. Fortunately I found a very good posts about how to move from Plone to WordPress. Basically I followed the steps outlined there.

To get my blog-posts, which are based on CoreBlog2, I had to modify the page-template a little, to find the right items in my plone catalog.

The next step was to convert the xml to an Moveable-Type format. Apposed to Len I didn’t do anything to convert my URL – at least not at this point. So the moveable-type format was now ready to be imported. Since CoreBlog allowed for posts to be grouped into categories as well as to have keywords assign, I decided to map the categories (contained in the element tag2) to PrimaryCategories and to map the keywords from Plone to Moveable Type keywords.

<xsl:for-each select="keyword">
<xsl:value-of select="." />,

So now I had my posts imported into WordPress. The last step was to make sure that at least some URLs would still work. Unfortunately I missed to get the names of the posts just as they where before – but I couldn’t find any Moveable Type property to specify the name of a post. So I doubt that this is actually possible – at least not with Moveable Types. And this was the way I had chosen, so I was stuck with “wrong” post-names.

But fortunately the post-dates where correct and unique. So created a little XSLT to generate update-statements for the WordPress database.

<?xml version="1.0"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="text" encoding="UTF-8" omit-xml-declaration="no" indent="yes" />
    <xsl:template match="/">
        <xsl:for-each select="//post">
update wp_posts set post_name='<xsl:value-of select="textFix" />' where post_date='<xsl:value-of select="creationDate" />';

So that took care of that.

I’m actually surprised how smooth this went – let’s see if nothing is missing.

Feeding the RSS

So I finally got around to enable RSS-feeding of my plone site. Currently this is only limited to the blog … but that’s just a matter of configuration.

In retrospective this wasn’t so hard to do, so I wonder why I didn’t do this before 🙂

OK, so how is this done? First of all you need to enable portal_syndication in the ZMI, and make the portal-action for syndication visible as well. Next you need to enable syndications explicitly for a certain object (folder).

Last you might want to edit the rss-template from the skins-folder (portal_skins/plone_templates/rss_template) to include the content body as well as just the description. To do this you have to add:

tal:replace="structure python:

just below the description element.