# Badge description disappeared in Chinese forum, seed\_fu problem?

**URL:** <https://meta.discourse.org/t/badge-description-disappeared-in-chinese-forum-seed-fu-problem/41744>\
**Category:** Bug\
**Created:** [March 30, 2016, 5:50am UTC](https://meta.discourse.org/t/badge-description-disappeared-in-chinese-forum-seed-fu-problem/41744 "2016-03-30T05:50:20Z")\
**Posts on this page:** 6\
**Page:** 1

## AI-generated summary

In the Chinese Discourse forum, [fantasticfears](/t/-/41744/1) reported that badge descriptions were missing in version 1.5.0.beta15 due to an issue where old badge names were not overridden by `seed_fu`, preventing the system from retrieving the correct i18n keys. The user noted that while new badges functioned correctly, existing system badges retained empty descriptions despite running `rake db:seed_fu` or attempting manual updates via the console. [fantasticfears](/t/-/41744/1) suggested a workaround involving the deletion of system badges (IDs under 100) followed by re-seeding to restore functionality. [sam](/t/-/41744/2) initially proposed adding an English fallback, but [fantasticfears](/t/-/41744/3) questioned why `seed_fu` did not update the names to match new translations. Ultimately, [sam](/t/-/41744/5) clarified that the issue was not with `seed_fu` itself but a specific bug in the code, which has since been fixed in a [commit](https://github.com/discourse/discourse/commit/44bf69e3a79d85c89981442fc52706fb10019570).

<div class="post-metadata">

**Author:** ![fantasticfears](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fantasticfears/32/119608_2.png) [@fantasticfears](https://meta.discourse.org/u/fantasticfears)\
**Post date:** [March 30, 2016, 5:50am UTC](https://meta.discourse.org/t/badge-description-disappeared-in-chinese-forum-seed-fu-problem/41744/1 "2016-03-30T05:50:20Z")

</div>

Badge doesn’t show the description at all.

Version: 1.5.0.beta15  
`DISCOURSE_DEFAULT_LOCALE`: zh\_CN

[https://meta.discoursecn.org/badges/15/第一次引用](https://meta.discoursecn.org/badges/15/%E7%AC%AC%E4%B8%80%E6%AC%A1%E5%BC%95%E7%94%A8)

 ![](https://global.discourse-cdn.com/meta/original/3X/b/a/ba968f09b41026438f5dbd16721d44a51433cc6f.png)

(First Quote)

It’s an old installation. The problem is that badge name is not overridden by seed\_fu. Without the proper name, it can’t get the i18n key. Therefore, description is not shown.

New badges are doing fine.

```
#<Badge:0x0055e8cab02a80
 id: 17,
 name: "读者",
 description: "",
 badge_type_id: 3,
 grant_count: 0,
 created_at: Mon, 29 Sep 2014 16:55:53 UTC +00:00,
 updated_at: Sat, 01 Nov 2014 01:42:51 UTC +00:00,
 allow_title: false,
 multiple_grant: false,
 icon: "fa-certificate",
 listable: true,
 target_posts: false,
 query:
  " SELECT id user_id, current_timestamp granted_at\n FROM users\n WHERE id IN\n (\n SELECT pt.user_id\n FROM post_timings pt\n JOIN badge_posts b ON b.post_number = pt.post_number AND\n b.topic_id = pt.topic_id\n JOIN topics t ON t.id = pt.topic_id\n LEFT JOIN user_badges ub ON ub.badge_id = 17 AND ub.user_id = pt.user_id\n WHERE ub.id IS NULL AND t.posts_count > 100\n GROUP BY pt.user_id, pt.topic_id, t.posts_count\n HAVING count(*) >= t.posts_count\n )\n",
 enabled: true,
 auto_revoke: false,
 badge_grouping_id: 1,
 trigger: nil,
 show_posts: false,
 system: true,
 image: "",
 long_description: nil>

```

(Reader)

I tried:

1. `rake db:seed_fu` success but doesn’t change the badge.
2. Invoked rake task in the console, not effective.
3. I copied the hash and update\_attributes to one old badge. The model is valid but it doesn’t change the record.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [March 30, 2016, 5:51am UTC](https://meta.discourse.org/t/badge-description-disappeared-in-chinese-forum-seed-fu-problem/41744/2 "2016-03-30T05:51:03Z")

</div>

ahh… I should add a fallback to en there …

---

<div class="post-metadata">

**Author:** ![fantasticfears](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fantasticfears/32/119608_2.png) [@fantasticfears](https://meta.discourse.org/u/fantasticfears)\
**Post date:** [March 30, 2016, 6:01am UTC](https://meta.discourse.org/t/badge-description-disappeared-in-chinese-forum-seed-fu-problem/41744/3 "2016-03-30T06:01:19Z")

</div>

Beyond fallback, shouldn’t the badge name changed by seed\_fu? I suppose the badge name will follow the new translation

---

<div class="post-metadata">

**Author:** ![fantasticfears](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fantasticfears/32/119608_2.png) [@fantasticfears](https://meta.discourse.org/u/fantasticfears)\
**Post date:** [March 31, 2016, 5:25am UTC](https://meta.discourse.org/t/badge-description-disappeared-in-chinese-forum-seed-fu-problem/41744/4 "2016-03-31T05:25:19Z")

</div>

Beyond a migration fix, for who might want to manually flush the system badges:

1. Enter rails console
2. Make sure your custom badge ids are larger than 100
3. `Badge.where('id < ?', 100).each { |b| b.delete }` deletes system badges
4. Exit console and run `rake db:seed_fu`. Everything is gonna be fine. Badges counts will be updated later.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [April 8, 2016, 7:56am UTC](https://meta.discourse.org/t/badge-description-disappeared-in-chinese-forum-seed-fu-problem/41744/5 "2016-04-08T07:56:45Z")

</div>

Not a seed\_fu issue, was a bug in the code, fixed per:

[https://github.com/discourse/discourse/commit/44bf69e3a79d85c89981442fc52706fb10019570](https://github.com/discourse/discourse/commit/44bf69e3a79d85c89981442fc52706fb10019570)

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [April 8, 2016, 7:56am UTC](https://meta.discourse.org/t/badge-description-disappeared-in-chinese-forum-seed-fu-problem/41744/6 "2016-04-08T07:56:47Z")

</div>

Closed on April 8, 2016, 7:56am UTC


