I am absolutely amazed by the features and design of Drupal and am in the process of converting my Movable Type installation. I was wondering if I could get some assistance from the folks who have already done this successfully.

Using the inspiration from http://urlgreyhot.com/drupal/index.php?q=node/view/419

I have been trying to create an index template that performs a data dump which I can load into Drupal, but have run into problems with quotes in the data not loading into the Drupal database among other issues.

Does anyone have a completed Movable Type index template that they could post?

My current site has about 1000 entries and 10,000 comments so once I get a conversion script completed I'll certainly post it for everyone else. I would imagine the conversion from Movable Type to Drupal is probably a pretty big snag for a lot of people who want to switch to it.



alexk’s picture

ok, so here is what I ended up doing to convert the site. one thing I can't figure out is that when I add a blog entry or comment it tries to insert the item with a unique ID that has already been taken because of my import. I get this error:

user error: Duplicate entry '12' for key 1

Anyone know what is causing this?

//import scriptfurnace blog
insert into drupal.node(nid,type,title,score,votes,uid,status,created,comment,promote,moderate,users,attributes,teaser,body,changed,static) select entry_id,'story' as type,entry_title,0,0,entry_author_id,1,unix_timestamp(entry_created_on) as created,2,1,1,'','' as attributes,entry_text,entry_text as body2,unix_timestamp(entry_modified_on) as modified,0 from drupal.mt_entry where entry_blog_id = 3 order by entry_id;

//import alex personal blog

//import ryan personal blog

//import kate personal blog

insert into
select comment_id,'0' as pid,comment_entry_id,1,left(comment_text,30),comment_text,comment_ip,unix_timestamp(comment_created_on),'' as link,0,0,'' as users from drupal.mt_comment order by comment_id

hafif’s picture

set the value of 'node_nid' in table 'sequences' according to the number of nodes you imported.. you should do the same with comments..

alexk’s picture

thanks a lot, I managed to get everything imported...