Invalid Interpolation Keys/ Broken by update

AI-generated summary

The discussion addresses an issue where topic_title_url_encoded and username interpolation keys are flagged as invalid in the user_notifications.reply_by_email email template after an update, despite being whitelisted. fuchs notes this prevents editing the email text and suspects it’s related to validation changes. A workaround is provided: manually updating the translation_overrides database entry for the email template, which restores functionality. tomtjes confirms the fix works for standard Docker installations but asks how to include linefeeds in the custom text. Additionally, the topic_title_url_encoded key is noted to not function correctly in the subject line, with a screenshot illustrating the problem.

We want to modify user_notifications.reply_by_email to achieve something similar to this:

While this worked fine editing the text is now impossible because topic_title_url_encoded and username are invalid now:

The following interpolation key(s) are invalid: “username, topic_title_url_encoded”

I suppose that this has to do with the validation (see Bulk Invite from File resets the Invite Forum Mailer customized text - #16 by tgxworld). However i am not sure why username and the title url should not be in the e-mail response.

Additionally, topic_title_url_encoded should be whitelisted but is still “invalid”.

By the way: Is there a list of (valid?) Interpolation keys?

Thank you very much

Workaround:

TL;DR: Just Overreide the value in the Database

1. Make shure the user_notifications.reply_by_email has been customized in some way. (Just add gibblish)
2. Create a Backup just to make shure
3 Modify the Value in the Database

For a Docker Installation acces the Database using

docker exec -it --user postgres [name of Docker Container] psql discourse

Obviously replacing the name

Then run

UPDATE public.translation_overrides SET value =
'[Desired Text using all Interpolation Keys you want]'
WHERE translation_key = 'user_notifications.reply_by_email' AND locale = 'de';

The locale should match obviously.

That’s it. Interpolation keys work fine as long as you dont hit edit for user_notifications.reply_by_email.

Once I figured out [name of Docker Container] is app for standard installations, this worked great.

Question: On the command line, how do you enter linefeeds in the [Desired Text using all Interpolation Keys you want]?

I also have an issue with topic_title_url_encoded: It doesn’t work as intended in the subject line. Screenshot: 17