After updating to "2.9.0.beta1", the number of clicks on the image URL is not counted

AI-generated summary

After updating to Discourse version “2.9.0.beta1”, pinkd reported that the number of clicks on image URLs is not being counted. They provided examples of affected and unaffected links, and attempted troubleshooting steps such as rebuilding the app. codinghorror requested an investigation, and pinkd offered additional context and debugging attempts.

However, tshenry revealed that this change is likely a side-effect of a deliberate update to remove hot-linked image links from user summaries. They argue that this change is an improvement, as click counters on images can be distracting and look out of place. JammyDodger agrees, having previously hidden click counters with CSS to avoid disrupting image grids. The discussion has been recategorized to a feature discussion by codinghorror.

Works in old posts.
However, the post after the update does not count the number of clicks on the image URL.
for example,
https://i.imgur.com/example.jpg

Note: I haven’t converted to a local image in my forum.

Just in case, I tried rebuilding, but it didn’t change.

cd / var / discourse
./launcher rebuild app

How to solve it?

2 Likes

By the way, the click count of links other than the image URL is working properly.
for example,

example.com
https://example.com/

@tshenry can you assign someone to investigate? Did we regress here?

2 Likes

I’d like you to come to my site, but it contains NSFW images, so …

1 Like

I also tried safe mode but it didn’t make sense.
The number of clicks “badge-notification.clicks” does not appear.

Has anyone encountered the same bug?
It’s not as deadly as this problem, but I hope it will be fixed someday.

not-number-of-clicks2

I actually prefer it not counting image link clicks, as before it would mess up the format of a picture grid, whereas now it doesn’t. :slightly_smiling_face:

I hid the click counters with a bit of CSS, but could never figure out how to take the whitespace out as well:

(Though if anyone can tell me how to remove the whitespace as well, then that would work for me too :slightly_smiling_face::+1:)

2 Likes

I’m fairly certain this is a (positive IMO) side-effect of this change:

https://github.com/discourse/discourse/pull/15675

The hot-linked image links were showing up in the Top Links section of user summaries and looked pretty awful. I didn’t realize it would take the click count off of hotlinked images in posts too, but I personally think that is an improvement as well for reasons like what @JammyDodger illustrated. The click counter was often distracting and felt out of place on images.

3 Likes

Thanks @tshenry – recategorizing to Contribute > Feature discussion.

1 Like

What site is yours you said not like your site .