Support » Plugins » Hacks » WXR import: comment_id and comment_parent values

  • Hi,

    I’m trying to help a friend import content from an stupid blogging platform that doesn’t provide a decent export function into her new wordpress blog, and I’m having a few problems with “nested” comments (that is, comments that are a reply to an earlier comment).

    I was able to grab content for her old blog using a script of my own, and my plan to import this content into WP is to have my script create a WXR file an then use the WP “import from wordpress” plugin.

    My problem is, I don’t know how to handle the wp:comment_id and wp:comment_parent tags. I get that the value of wp:comment_parent for the “child” comment should be the value of it’s parent wp:comment_id tag, but unfortunately during the import WP seems to change the comment_id of comments it imports so that the comment_parent field of child comments becomes invalid.

    What am I doing wrong?

Viewing 1 replies (of 1 total)
  • Ok, I found the culprit: I need to make sure the comment_id of the child is higher than the comment_id of the parent, so that the parent is imported before the child.

    Works like a charm now.

Viewing 1 replies (of 1 total)
  • The topic ‘WXR import: comment_id and comment_parent values’ is closed to new replies.