Don't show click count

Hi team,

I have a small discourse forum, but I see that many link don’t show click count like link below:

There have any problem?

Pls help me, many thanks.

Are you 100% sure the links have been clicked by other users?

2 Likes

yup, i’m sure. I created many user and tried.

1 Like

I’ve done an extensive investigation of this after @tophee brought it up :

My conclusion is click counters may not be supported for:

  • links with username arguments
  • links with slugs that are not up-to-date (basically, you have changed the title of the target topic after you generated the link). The link still works but this breaks the counter logic.
  • links with #headings (ie links which lead you to text mid-post).

Check the links that you have problems with don’t meet one of those criteria. The most likely issue is that your slug is not up-to-date.

On top of that Rebuilding HTML admin command does not fix #2 (out of date slugs) - it would be nice if it did as the only option is to manually update each slug that is out-of-date.

Also i’ve noticed that editing posts sometimes results in unpredictable resets of some counters, but not others.

4 Likes

I don’t think so, I see that some time I click it count and some time click many time it just count 1 time :frowning:

So I think I’ll waiting for core update.

Many thanks about you support :blush:

Sorry didn’t dig into that, but It’s only upping the counter once per user, or is at least rate limited in some way (e.g. once per session), I think - for good reason I suspect: the counter is giving you feedback on the number of users that have clicked a link, not the number of times users have clicked the link (and I like the former statistic, it’s more useful).

I haven’t looked at the code yet to confirm though.

4 Likes

Now following here as my thread about this in #bug has been closed and moved to #support

https://meta.discourse.org/t/editing-post-causes-link-click-counter-to-be-lost/100445/8

is there an official tracker for this issue @codinghorror?

For counters missing, sure, Click counter missing for some internal links is where I was looking forward for clear repros.

1 Like

In order to produce repro steps, it would be helpful to know what the intended behaviour is. So are you implying that all links are supposed to have click counters?

All external links should have counters. Internal links… maybe topics should (@codinghorror’s call) but other stuff should not.

There is also a visual component here, we can not sprinkle numbers all over a onebox… so … start with what you consider totally weird and we can work our way in.

2 Likes