A user reported a bug where selecting or deselecting favorite badges in the Discourse interface resulted in a “FAILED” error, with the badge selection state not updating properly. The issue involved inconsistent behavior: clicking once to select or deselect a badge often failed, while a second click sometimes worked. The user noted that the badge count and star icon didn’t update correctly, and the Discourse banner disappeared when the error modal appeared. The issue was acknowledged by the team, and a fix was implemented via a pull request 12. After the fix was merged, the user confirmed the bug was resolved, and the topic was closed with the issue fully fixed.
They won’t go, they won’t go
Can’t choose badges anymore
They won’t go, They won’t go
They’re both frozen to the floor
They’re forever here and going to stay
Let the clicks rage on
I hope there’s a fix coming any day
1st click will make the badge selected but the star icon is not displayed as “filled”, if refresh the page will see it was selected and the badge is displayed on user card properly.
But with the display issue, when user click the second time, the star icon will show as filled which actually cancel the selection.
I do have to remember to only single-click on the star, ignore the fact that the selected count doesn’t update, and refresh the page to see the proper results. If I click the star twice so that it appears to be unselected, the count at the top decrements, but when I refresh, the count reverts and the badge is still selected.
In essence, clicking the star once doesn’t seem to refresh the state of the page while clicking twice does. However, correct underlying functionality is only had from a single click and a manual refresh.
Oh, I’m able to reproduce the problem. Now it is some client side quirk. Jonathan, thanks for reporting! I’ll take care of this and post updates on this topic.
Hmm, wait, we haven’t merged it yet. I’m going to merge it tomorrow. @griffin my PR should fix the behaviour that you’re describing. I’ll double-check it anyway.
So it may be that the functionality was there, but that the appearance was deceptive. Either way, hopefully your PR will squash this bug once and for all!