Support » Fixing WordPress » TypePad importer turns pings into comments

  • Movable Type and Typepad Importer version 0.4 (the most recent) is turning Typepad PIngs into comments. When I look at the export file from Typepad, it clearly denotes it as a ping:

    URL: ht
    (body of trackback/ping here)

    However when the importer is finished, it has turned it into a WordPress Comment and not a Ping.

Viewing 1 replies (of 1 total)
  • After some spelunking in movabletype-importer.php I was able to solve the problem.

    Sure enough, when saving the trackback the importer fails to to tell wp_insert_comment that it is a tackback and not a normal comment.

    Old (at line 309):

    $ping['comment_post_ID'] = $post_id;
    $ping = wp_filter_comment($ping);

    Changed to:

    $ping['comment_post_ID'] = $post_id;
    $ping['comment_type'] = 'trackback';
    $ping = wp_filter_comment($ping);

    In addition, Typepad appends “[Read More…]” to the end of the body, making clicking thru to the original blog more intuitive. TO mimic this behavior I changed line 308:


    $ping['comment_content'] = "<strong>{$ping['title']}</strong>\n\n{$ping['comment_content']} ";

    Changed to:

    $ping['comment_content'] = "<strong>{$ping['title']}</strong>\n\n{$ping['comment_content']} <a href='" . $ping['comment_author_url'] ."'>[Read More...]</a>";

Viewing 1 replies (of 1 total)
  • The topic ‘TypePad importer turns pings into comments’ is closed to new replies.