# Invalid Interpolation Key

**URL:** https://meta.discourse.org/t/invalid-interpolation-key/87944
**Category:** Support
**Created:** [May 20, 2018, 7:10pm UTC](https://meta.discourse.org/t/invalid-interpolation-key/87944 "2018-05-20T19:10:39Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![BlackKnob](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blackknob/32/93549_2.png) [@BlackKnob](https://meta.discourse.org/u/BlackKnob)
#### Post date: [May 20, 2018, 7:10pm UTC](https://meta.discourse.org/t/invalid-interpolation-key/87944/1 "2018-05-20T19:10:39Z")

</div>

`discourse_narrative_bot.new_user_narrative.hello.message`  
doesn’t accept  
`%{new_user_tips}`

is there a reason for it?

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [May 20, 2018, 7:47pm UTC](https://meta.discourse.org/t/invalid-interpolation-key/87944/2 "2018-05-20T19:47:16Z")

</div>

Why should it? You can’t use arbitrary interpolation keys within translations. Only the ones used in the English text and this particular text doesn’t use any interpolation.

> <https://github.com/discourse/discourse/blob/1841dd48dc5c15025dac8b6054c35045334a2a55/plugins/discourse-narrative-bot/config/locales/server.en.yml#L152-L159>

---

<div class="post-metadata">

### Author: ![BlackKnob](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blackknob/32/93549_2.png) [@BlackKnob](https://meta.discourse.org/u/BlackKnob)
#### Post date: [May 20, 2018, 8:32pm UTC](https://meta.discourse.org/t/invalid-interpolation-key/87944/3 "2018-05-20T20:32:33Z")

</div>

not sure what you mean by “arbitrary”.

`%{new_user_tips}` links to `system_messages.usage_tips.text_body_template` and can be used in:  
`system_messages.welcome_user.text_body_template`  
`system_messages.welcome_invite.text_body_template`

---

<div class="post-metadata">

### Author: ![kimardenmiller](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kimardenmiller/32/119631_2.png) [@kimardenmiller](https://meta.discourse.org/u/kimardenmiller)
#### Post date: [December 4, 2019, 11:33pm UTC](https://meta.discourse.org/t/invalid-interpolation-key/87944/4 "2019-12-04T23:33:07Z")

</div>

I’m also confused on this topic of valid interpolation keys in templates. We previously customized templates such as `user_notifications.reply_by_email`, e.g. to say …

- Visit Topic or reply to this email to respond.
- Reply with a private message

The second item has the link:

```
%{base_url}/new-message?username=%{username}&title=Your%20post%20%{topic_title_url_encoded}&body=Regarding%20your%20post%20in%20%{base_url}%{url}

```

This has been in use for some time and works perfectly. Today we need to change the text in `user_notifications.reply_by_email`, but on saving get the error:

```
The following interpolation key(s) are invalid: "username, topic_title_url_encoded"

```

Why the limitation now, and how can we get around it?

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [September 10, 2023, 7:36am UTC](https://meta.discourse.org/t/invalid-interpolation-key/87944/5 "2023-09-10T07:36:29Z")

</div>


