WordPress 2.0 Bug: Movable Type Comments Import

lsw-x

I’ve run an number of MT to WordPress imports over the past few weeks. Almost all of them, I was importing MT into WordPress version 2.0. And there is a bug in the process.

Posts an authors imported just fine.

Comments and trackbacks on the other hand? They do import – but you won’t see them. Within your WP admin panel – you won’t see them in the Manage –> Comments area, nor will you see them in the moderation queue.

However, if you look in the database – they are, indeed there.

The comments do get imported – however the comment_approved field database table is blank. They are not marked as approved, unapproved or spam – it’s just blank. Unassigned.

Quick fix? Run a SQL Query via phpMyAdmin (or your choice.) Here’s what did it for me:

UPDATE wp_comments SET comment_approved = ‘1’ WHERE comment_approved = ”

Fixed it right up – all comments and trackbacks are present an accounted for.

It’s definitely a bug, though, that needs fixing. I can’t tell you how many clients I do MT to WP imports for on a regular basis. Ugh!

Posted in

20 thoughts on “WordPress 2.0 Bug: Movable Type Comments Import”

  1. Gaaah!

    I stumbled upon your bit o’ code hoping against hope…but for naught. I keep getting:

    “#1054 – Unknown column ‘‘’’ in ‘where clause'”

    Oh, god…I did not want to learn how to code *this* way.

    Sigh…

  2. communicatrix: You may want to try straight typing it into your sql editor. If you’re cutting and pasting – the curly quotes might be transferring over, and they should be ticks, not curlies. Just a thought.

    Johnny Nemo: you just take that sql statement above and place it in your sql editor and run the query. Most hosts give you the ability to work with your database via phpMyAdmin, or some other MSYQL tool. If you aren’t familiar with those tools, I can’t help you. Try dropping your webhost and email for assistance. 🙂

  3. Hmm… excellent fix.
    But I do have this strange anomaly.
    Comments show up when i request the page…. but the index says comments 0 and in the admin interface, it says comments 0 on the manage post page, but it shows the comments in the manage comments dialog… not sure whats up there. Any ideas?

  4. Pingback: Relentless Grace » Blog Archive » Changing to WordPress

  5. Oh, thank you thank you thank you!! I decided to convert today and nearly had a cow when the comments didn’t transfer. You just saved my butt.

    I fixed the No Comments displaying even when there were comments by posting a new comment to each entry and then deleting them. But that’s not a very time efficient way to do it if you have a large blog.

  6. zro – not sure without tinkering around in the guts of the site and looking at your php coding. The 2.0 upgrade is a little buggy, to be sure . . word has it that yet another upgrade is forthcoming soon.

    Shawna – I’m happy that it worked for you. I was so relieved when it worked out for me – – I converted one blog that had over 3000 comments on it! Phew!

  7. I did the above, and now the comments are showing up – but there is still one problem!

    The posts comment counter still shows zero! In the table wp_posts, there is a comment_count field, which is set at zero for all entries, though they have comments – how can I sync this with the actual comment count?

  8. KD, are you running an older version of Spam Karma?

    The comments db table changed with WP 2.0, and a comment_count field has been added. Older versions of Spam Karma aren’t aware of this, so doesn’t update the comment count properly.

    You can run the SK2 Compatiblity Plugin, then upgrade to the latest version of Spam Karma (2.1).

  9. Hi,
    I’m the author of the oddly named SK2-WP2Compatibility plugin mentioned by Wench above. Just a note to let everyone know that you no longer need this SK2 plugin.

    Simply upgrade to the latest version of Spam Karma and that will fix comment counts for you. No plugin required 🙂

  10. Pingback: MyMicroISV » Move finally complete.

  11. I’m clueless. I reinstalled WP and though I saved my posts/comments I can’t import them.
    I guess I’m trying to say this is a new install and I would like to import my prior WP posts & comments.
    Fab site!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top