Double number of clicks notification badge

AI-generated summary

The “Double number of clicks notification badge” issue occurs when two links share the same substring, resulting in duplicate click badges. zogstrip identified the bug and provided an example of the JSON code causing the issue. dandv reported seeing the issue in multiple posts. zogstrip has since pushed a fix for the bug.

What does it mean when a link has two “number of clicks” badges, such as in this post? They both have the same tooltip (“N clicks”) and link to the same post.

3개의 좋아요

I actually think it’s a bug.

It happens when you have two links which starts with the same substring.

EDIT: here’s what we have in the JSON

link_counts: [
  {
    url: "https://meta.discourse.org/t/cant-install-docker-on-linode-aufs-tools-not-found/18416",
    clicks: 3
  },
  {
    url: "https://meta.discourse.org/t/cant-install-docker-on-linode-aufs-tools-not-found/18416/99999999",
   clicks: 0
  }
]
5개의 좋아요

Seen again in this post.

1개의 좋아요

Just pushed a fix :dancers:

https://github.com/discourse/discourse/commit/8a1a9f60a2df30661b842142200b2449bd2801ed

6개의 좋아요