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 „Gefällt mir“

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 „Gefällt mir“

Seen again in this post.

1 „Gefällt mir“

Just pushed a fix :dancers:

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

6 „Gefällt mir“