# Popup message and Text customization issue after upgrade

**URL:** <https://meta.discourse.org/t/popup-message-and-text-customization-issue-after-upgrade/255529>\
**Category:** Bug\
**Tags:** chat\
**Created:** [February 18, 2023, 12:02am UTC](https://meta.discourse.org/t/popup-message-and-text-customization-issue-after-upgrade/255529 "2023-02-18T00:02:55Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [February 18, 2023, 6:01pm UTC](https://meta.discourse.org/t/popup-message-and-text-customization-issue-after-upgrade/255529/2 "2023-02-18T18:01:03Z")

</div>

I’ve just given this a run-through of my test site and I can repro this. I hadn’t updated my test site for a little while and on version [f19044af6a](https://github.com/discourse/discourse/commits/f19044af6acaed6e34408eda9e6e82521aafb744) it worked fine, but updating to latest [39be3cb619](https://github.com/discourse/discourse/commits/39be3cb619cee0c6e84d9cb163a7b53adde35d58) gave the same behaviour as reported.

My step-by-step:

(Version [f19044af6a](https://github.com/discourse/discourse/commits/f19044af6acaed6e34408eda9e6e82521aafb744))

- Set `default locale` to ‘Español’
- Set `chat dm retention days` to ‘30’
- Go to `/admin/customize/site_texts` and edit `js.chat.retention_reminders.dm`
- Refresh and check the message with a new test user:

 ![image](https://global.discourse-cdn.com/meta/original/4X/f/9/7/f97d74d900f7a06a523eca0bd68ebcba13a0d374.png)

Update to [39be3cb619](https://github.com/discourse/discourse/commits/39be3cb619cee0c6e84d9cb163a7b53adde35d58)

- Existing message has raw parameter value:  

- Go to `/admin/customize/site_texts` and edit `js.chat.retention_reminders.dm` now gives an error 500 with this in the logs:

```plaintext
Message (4 copies reported)

NoMethodError (undefined method `scan' for {:one=>"Personal chat history is retained for %{count} day.", :other=>"Personal chat history is retained for %{count} days."}:Hash

    keys = text.scan(pattern)
               ^^^^^)
lib/i18n/i18n_interpolation_keys_finder.rb:6:in `find'
app/models/translation_override.rb:124:in `check_interpolation_keys'
app/models/translation_override.rb:65:in `upsert!'
app/controllers/admin/site_texts_controller.rb:88:in `update'
app/controllers/application_controller.rb:414:in `block in with_resolved_locale'
app/controllers/application_controller.rb:414:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:74:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:369:in `call'
config/initializers/100-quiet_logger.rb:20:in `call'
config/initializers/100-silence_logger.rb:29:in `call'
lib/middleware/enforce_hostname.rb:24:in `call'
lib/middleware/request_tracker.rb:228:in `call'

Backtrace

lib/i18n/i18n_interpolation_keys_finder.rb:6:in `find'
app/models/translation_override.rb:124:in `check_interpolation_keys'
activesupport (7.0.4.1) lib/active_support/callbacks.rb:400:in `block in make_lambda'
activesupport (7.0.4.1) lib/active_support/callbacks.rb:199:in `block (2 levels) in halting'
activesupport (7.0.4.1) lib/active_support/callbacks.rb:687:in `block (2 levels) in default_terminator'
activesupport (7.0.4.1) lib/active_support/callbacks.rb:686:in `catch'
activesupport (7.0.4.1) lib/active_support/callbacks.rb:686:in `block in default_terminator'
activesupport (7.0.4.1) lib/active_support/callbacks.rb:200:in `block in halting'
activesupport (7.0.4.1) lib/active_support/callbacks.rb:595:in `block in invoke_before'
activesupport (7.0.4.1) lib/active_support/callbacks.rb:595:in `each'

```

---

_[View the full topic](https://meta.discourse.org/t/popup-message-and-text-customization-issue-after-upgrade/255529)._
