Private likes count shown in public profile

I know that, in the past, “total likes count” used to be equal to “public likes+private likes”.

In my old discourse sites, there are a lot of users with 1k+ “as their likes count” - which includes “public+private likes”.

But, in a newly installed Discourse instance, I noticed that, “Private likes are no more counted in “total likes count” shown in public profiles”

My question - Is there any way to fix the “likes count” in my old discourse site?

Bump.

I’m sure there is going to be lots of users, with Discourse sites, in which the “likes count” needs to be fixed.

this is by design, exposing private information in the counts was a bug.

2 Likes

@sam
Is there a way we can fix the “likes-count” now that the bug has been fixed.

As in to revert the fix and break the fix we deployed.

No there is no way to do that.

@sam
I didn’t quite get you there.

If I’m understanding things correctly:

Now that the bug has been fixed, likes-count = “count of likes received publicly”

Previously, likes-count “was” = “count of likes received publicly + through PM”

So, for new users, everything looks good. But for existing users, “likes-count” is wrong.

So, now that the bug has been fixed, is there any way, we can initiate a “re-counting of likes” and then make it display the right count? I have read in other threads about commands that fix the “posts-count”, “topics-count” etc. Is there such a command that we can issue for fixing the “likes-count”

There is possibly a rake task for this, will have a look tomorrow.

4 Likes

Just as here: Is this something that should occasionally be recomputed on every instance to make sure this data is consistent? I’d like to see that.

There is already a query for this that runs daily, trouble is that it was broken.

I fixed it per: FIX: stop counting PMs, deleted topics and whispers in directory and … · discourse/discourse@7e841a0 · GitHub

After applying this fix @nixie you must wait at least 24 hours for the directory to be re-calculated and it should automatically fix the existing bad counts.

4 Likes

Thanks for following up on this @nixie we fixed a long standing bug :beers:

4 Likes

@sam
Will it work “even if the user directory is disabled in the site” ?

No it will now, directory must be enabled for the fix to work.

It will fix likes given and received counts.

4 Likes

@sam
I’m thinking of enabling the user-directory “just for 1 day” to fix the “old counts”
And once the “old counts” are fixed, I will disable the “user-directory”.
This is my plan.

Or do you think, I should “enable the user-directory” forever to ensure that the counts don’t go off again?

I would recommend this, not sure why you want to disable it.

3 Likes

I have never tried it before, so was thinking twice before enabling it forever.
I made up my mind - I’m going to enable in my site. :slight_smile:

This topic was automatically closed after 19 hours. New replies are no longer allowed.