일부 포럼의 배지 페이지에서 숫자 대신 NaN이 표시됩니다

On some Discourse forums, for example Python and iNaturalist, NaN appears instead of a number on some pages related to badges.

See iNaturalist Forum: NaN instead of a number on badge pages.

5개의 좋아요

I can see it here on Meta too. For example on https://meta.discourse.org/badges/114/bug-reporter?username=nat

I must be overlooking something

1개의 좋아요

I think I found it. It’s related to the changes in DEV: Replace deprecated Ember's array `.pushObjects` by megothss · Pull Request #35663 · discourse/discourse · GitHub. That change made userBadges an array, but othersCount still expects something with a grant_count value.

2개의 좋아요

Thanks. Will the eventual fix require any subsequent action on the part of maintainers of individual Discourse forums, or will the fix propagate automatically to those forums?

Once the bug is fixed, the forum needs to be updated. On self-hosted forums, this is something the admin needs to do. iNaturalist is hosted by Discourse, so they take care of updates. This usually happens very regularly. Perhaps the person who fixes this will also make sure that the forum receives an update. However, I don’t know whether the bug is considered severe enough to warrant this.

1개의 좋아요

Yeah, quite likely nobody has been losing any sleep over this detail, but it seemed to me a good idea to report it in case it also affected other details on the forums.

1개의 좋아요

I also just noticed this right now, I was going to file a bug report but then I found this topic.

On forums that are not hosted by Discourse , the text is correct because something new with the code changed the badge page to NaN.

Forums that have not updated yet are not affected by this.

For example, the Dark Gaming forum uses Discourse v3.6.0.beta1-dev from this commit (3352cec1bb) and everything is correct.

Another edit: Admins of the site can work around this by modifying the texts js.badges.others_count.other and js.badges.others_count.one but this bug is going to be fixed relatively quickly.

1개의 좋아요

Edit:
Looks like there’s already a merge in flight. Meta should be updated with it soon.
https://github.com/discourse/discourse/pull/35895


This should fix the issue.
https://github.com/discourse/discourse/pull/35911

4개의 좋아요

Thanks for the fix, Discourse Team.

1개의 좋아요

Thanks for the quick fix.

Would at least one @team member like the first post? I think Quercus deserves the badge.

5개의 좋아요