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!
20 thoughts on “WordPress 2.0 Bug: Movable Type Comments Import”
Thank you, ma’am!
But of course, this isn’t a WP issue. It’s a mysql issue, didn’t you get the memo? 😉
I can only say . . . pfft!
Can you give explicit instructions for those boneheads among us?
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.
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. 🙂
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?
Pingback: Relentless Grace » Blog Archive » Changing to WordPress
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.
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!
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?
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).
Hi, thanks for the help!
I’m on a completely new install of WP 2.0, with no plugins.
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 🙂
Pingback: MyMicroISV » Move finally complete.
God bless you ma’am!! 🙂
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.
This site is one of the best I have ever seen, wish I had one like this.
I have never had much luck importing anything to anything.
Just for once it would be great to have a tool that worked as stated :)>-