Importing comments – only last one gets imported
-
I am trying to move about 126 posts to WordPress using a custom WRX formatted file. The posts and categories import fine.
But the comments: only the LAST comment of all comments is imported. So all of my posts say, “One commenter.”
This is in error. I have some posts with well over 500 comments. Most only have 5 to 10 though.
To diagnosis this, I have tried to import just a single post with 5 comments. Only the last comment is imported still.
No comments have a “parent”, as they are set to 0. I have also ensured that every comment has a comment_id and that all empty nodes are closed.
To compare, I have created a fake post and a number of fake comments. i then exported this post and comments via WordPress’ export feature and compared. I am not setting the following:
* wp:comment_author_IP (does not list in my feed)
I don’t show the author_IP, and at least the last comment is imported. I do properly fill in the rest of the wp:comment_* variables, except the following empty ones:
* wp:comment_author_url
* wp:comment_typeLastly, I don’t always have the following for my comments:
* wp:comment_author_email
It is mostly blank for most comments.
So I am t a loss as to why the other comments aren’t being imported.
Are one of these empty fields required? such as email?
The blog I need help with is: (visible only to logged in users)
-
Hi there,
Are you attempting to import into eduncan911.wordpress.com? If so, I don’t see a recent xml file import. The only imports I see are txt imports. Can you let me know where you’re exporting from and where you’re importing too?
-
Thanks Jeremey.
I actually imported, deleted, imported, deleted about 30 times until I figured it out. Your WRX importer is not documented of the requirements – which it needs a “comment_id” for each and ever comment. When there is no comment_id present, it only imports the last comment – even if there are 600+ of them on a single post.
I resolved it by inserting a comment_id, manually, for all 1000+ comments.
Also the importer has serious issues with empty nodes like this:
<wp:comment_url> </wp:comment_url>Notice the empty node, with a line break? This actually prevented the comment from being imported as well. There are other very similar empty node issues, and some that are required. It was very difficult to figure out.
-
Sorry, should have mentioned that to fix the empty nodes like this:
<wp:comment_url> </wp:comment_url>It needs to be closed like this instead:
<wp:comment_url />-E
-
I’m glad you were able to figure this out! That does make sense that the comment ID needs to be specified. I apologize that you had to do it manually! As for the empty nodes, I’ll bring this up with our developers.
Let me know if you need anything else!
- The topic ‘Importing comments – only last one gets imported’ is closed to new replies.