Already run rake import:ensure_consistency still -1 replies even tho I have imported Posts properly

there is -1 even tho i have tried rake import:ensure_consistency

I even try to run the “insert_post_replies”
0 inserted.

Wait. I thought that you said in our phone call that all posts were owned by system (-1), but this screenshot looks like those topics do have proper owners.

Always trying to talk myself out of work, perhaps what you want to do is:


I did this last week on a site where I had done something like

a_bunch_of_topics.update_all(category_id: new_category_id)

and it solved what I think is your problem.

1 Like

Category.ensure_consistency! will solve the -1 replies for each topic?

What happens when you reload the topic list page in your first image?

still like this. with -1 replies.

1 Like

Darn. It might be that those zillion sidekiq jobs need to do something, or it might be that your database is corrupt somehow.

Let me know when you have approval from your boss and we can take this discussion elsewhere.

1 Like

Thanks Jay! Will surely let you know

where in database that -1 is counting? because if it is corrupted for example the first result in the screenshot above has 2 post_counts

Oh. Sorry. That’s replies, not the category stuff. I don’t know offhand what the problem is.