# I18n keys showing on Webhooks edit page

**URL:** https://meta.discourse.org/t/i18n-keys-showing-on-webhooks-edit-page/297701
**Category:** Bug
**Created:** [March 3, 2024, 2:09pm UTC](https://meta.discourse.org/t/i18n-keys-showing-on-webhooks-edit-page/297701 "2024-03-03T14:09:41Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![uckelman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/uckelman/32/103854_2.png) [@uckelman](https://meta.discourse.org/u/uckelman)
#### Post date: [March 3, 2024, 2:09pm UTC](https://meta.discourse.org/t/i18n-keys-showing-on-webhooks-edit-page/297701/1 "2024-03-03T14:09:41Z")

</div>

I’m seeing this on the Webhooks edit page with 3.3.0.beta1-dev:

 ![image](https://global.discourse-cdn.com/meta/original/4X/4/8/0/4804d3b1578a508a5aefbe5f649e2953317a97b5.png)

Two of the sections and their checkbox labels appear to be showing i18n keys instead of the values of those keys. E.g., I’m fairly sure that

`[en.admin.web_hooks.voting_event.group_name]`

is not the intended header for whatever category that’s supposed to be.

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [March 3, 2024, 3:44pm UTC](https://meta.discourse.org/t/i18n-keys-showing-on-webhooks-edit-page/297701/2 "2024-03-03T15:44:23Z")

</div>

Good catch!

You are not supposed to see the webhook of plugin that is not installed on your Discourse.

This is a regression from here:

[https://github.com/discourse/discourse/commit/c46811092994d456e7a67b33669b76e51aaa3668#diff-2dd34e39ecc3176d116ca671641ae175f4d74db68e0db21f0eea477cdd45b818](https://github.com/discourse/discourse/commit/c46811092994d456e7a67b33669b76e51aaa3668#diff-2dd34e39ecc3176d116ca671641ae175f4d74db68e0db21f0eea477cdd45b818)

Specifically here.  
The symbols provided in `TYPES` don’t match the list values:

> <https://github.com/discourse/discourse/blob/main/app/models/web_hook_event_type.rb#L72-L75>

> <https://github.com/discourse/discourse/blob/main/app/models/web_hook_event_type.rb#L98-L112>

> **To the team, here is a possible solution:**
>
> ```ruby
> def self.types_with_prefix(prefix)
> TYPES.select { |key, _value| key.to_s.start_with?(prefix.to_s) }.values
> end
> 
> def self.active
> ids_to_exclude = []
> unless defined?(SiteSetting.solved_enabled) && SiteSetting.solved_enabled
> ids_to_exclude.concat(types_with_prefix(:solved))
> end
> unless defined?(SiteSetting.assign_enabled) && SiteSetting.assign_enabled
> ids_to_exclude.concat(types_with_prefix(:assign))
> end
> unless defined?(SiteSetting.voting_enabled) && SiteSetting.voting_enabled
> ids_to_exclude.concat(types_with_prefix(:voting_topic))
> end
> unless defined?(SiteSetting.chat_enabled) && SiteSetting.chat_enabled
> ids_to_exclude.concat(types_with_prefix(:chat_message))
> end
> self.where.not(id: ids_to_exclude.flatten)
> end
> 
> ```

---

<div class="post-metadata">

### Author: ![kris.kotlarek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kris.kotlarek/32/176919_2.png) [@kris.kotlarek](https://meta.discourse.org/u/kris.kotlarek)
#### Post date: [March 5, 2024, 3:36am UTC](https://meta.discourse.org/t/i18n-keys-showing-on-webhooks-edit-page/297701/5 "2024-03-05T03:36:28Z")

</div>

Thank you for reporting this issue 🎊

I fixed it today with in this PR

[https://github.com/discourse/discourse/pull/26022](https://github.com/discourse/discourse/pull/26022)

---

<div class="post-metadata">

### Author: ![nat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nat/32/235063_2.png) [@nat](https://meta.discourse.org/u/nat)
#### Post date: [March 7, 2024, 4:39am UTC](https://meta.discourse.org/t/i18n-keys-showing-on-webhooks-edit-page/297701/6 "2024-03-07T04:39:24Z")

</div>

This topic was automatically closed after 2 days. New replies are no longer allowed.
