Posts and topics not counted after migration

Hey guys,

after migrating from NodeBB with help of this guide using the NodeBB migration script everything looks good - all the categories, topics, posts etc. are there.

But I’ve noticed that every user has zero posts counted by Discourse. A user for example has 500 likes but 0 posts in the users overview. As all the posts are there, is there maybe a function to get the post count updated?

On the other hand, on a users profile the topics and posts in top categories are counted:

I think a task runs that will fix that soon. You might also try

rake import:ensure_consistency
4 Likes

@nino1904 were you able to resolve your issue?

1 Like

I could say yes but I would like to try another migration. I’ve tried a few things that day and suddenly the post counts were there - but way too many. For example in NodeBB a user has like 1.5k posts, in Discourse the user has 2.8k posts.

1 Like

Could discourse be importing deleted posts? That’s a big difference, though.

Another possibility is that Discourse counts pms and public posts and the other system counts them separately.

1 Like

Good point, NodeBB does not count private messages. But private messages are not getting imported so not sure about that. By the way, why does Discourse count private messages as posts?

I’m not 100% sure that it does, but they are on the same posts table. I don’t know if the post count you’re looking at counts just the regular posts or all of them.

1 Like