Badge details page shows a "undefined" user and debounce issues

https://meta.discourse.org/badges/13/first-flag

EDIT: a dangling badge shows when associated user is deleted.


Debounce issues repro:

  1. around 300px height browser window
  2. Keep fast scroll down.
  3. I requested twice around 96 offset in three tries.

That user was deleted – so that’s why they don’t show up.

1 Like

Most of the default Badges are revocable.

For those, when the queries are run again revoked badges won’t show on their pages.

A few of the default Badges are not revocable i.e.
Reader
First Flag
Anniversary
Hot Link
Famous Link

For those, once they’re there, they’re there.

I guess the logic of First Flag is to award it when the Flag feature is used, regardless of whether or not the Flag was Agreed or not. It isn’t First Good Flag after all.

Unfortunately I don’t see an easy CSS fix for removing the div entirely or the “granted at” from the page.

1 Like

Hiding them is quite easy but since the root cause is that badges are not revoked when a user is deleted.

Might worth cleaning them anyways

Yeah we should clean these things up on deletion… having a look at sorting this out.

Note, we already have “dependant destroy”, so something fishy is up.

2 Likes

This fixes the orphan issue:

https://github.com/discourse/discourse/commit/418bc4a844820352f7ab94400c5e51285b000967

5 Likes

This fixes the second issue:

https://github.com/discourse/discourse/commit/7ab153dac3c7111451d186486964dab9d7e5855f

But please, in future, one bug report per topic.

3 Likes