# Cannot update text for js.composer.error.post\_length

**URL:** https://meta.discourse.org/t/cannot-update-text-for-js-composer-error-post-length/254611
**Category:** Support
**Created:** [February 9, 2023, 1:23pm UTC](https://meta.discourse.org/t/cannot-update-text-for-js-composer-error-post-length/254611 "2023-02-09T13:23:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![zcuric](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zcuric/32/292837_2.png) [@zcuric](https://meta.discourse.org/u/zcuric)
#### Post date: [February 9, 2023, 1:23pm UTC](https://meta.discourse.org/t/cannot-update-text-for-js-composer-error-post-length/254611/1 "2023-02-09T13:23:00Z")

</div>

I’m trying to update text for `js.composer.error.post_length`. Experiencing this on 2.9 and 3.1.0.beta2, on production, staging and in my local environment.

On FE it shows `[missing {{min}} value]` although value has been set.

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/b/8/7b8bf55dfca08c71703181c9b8305242e9616d06.png)

Error log says:

```plaintext
NoMethodError (undefined method `scan' for {:one=>"Post must be at least %{count} character", :other=>"Post must be at least %{count} characters"}:Hash keys = text.scan(pattern) ^^

```

```plaintext
Message

NoMethodError (undefined method `scan' for {:one=>"Post must be at least %{count} character", :other=>"Post must be at least %{count} characters"}:Hash

    keys = text.scan(pattern)
               ^^^^^)
lib/i18n/i18n_interpolation_keys_finder.rb:6:in `find'
app/models/translation_override.rb:123:in `check_interpolation_keys'
app/models/translation_override.rb:64: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'
config/initializers/100-quiet_logger.rb:20:in `call'
config/initializers/100-silence_logger.rb:29:in `call'
lib/middleware/missing_avatars.rb:22:in `call'
lib/middleware/turbo_dev.rb:31:in `call'

Backtrace

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

Env

HTTP HOSTS: 127.0.0.1:3000
```

---

<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: [February 9, 2023, 7:34pm UTC](https://meta.discourse.org/t/cannot-update-text-for-js-composer-error-post-length/254611/2 "2023-02-09T19:34:11Z")

</div>

That string was changed back in 2021. It uses `%{count}` instead of `%{min}` and has been converted into a pluralized string (one, other).

You can fix your customized string by going to Customize → Text:

- Search for “js.composer.error.post\_length”
- click “edit”
- click “revert changes” and confirm the question with “yes”
- click “back to search”
- Search for “js.composer.error.post\_length”
- You will see 2 results, customize both strings if you wish

---

<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: [February 9, 2023, 7:39pm UTC](https://meta.discourse.org/t/cannot-update-text-for-js-composer-error-post-length/254611/3 "2023-02-09T19:39:23Z")

</div>

I wonder, could we build error handling that falls back to English in these cases and logs something?

---

<div class="post-metadata">

### Author: ![zcuric](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zcuric/32/292837_2.png) [@zcuric](https://meta.discourse.org/u/zcuric)
#### Post date: [February 10, 2023, 12:19pm UTC](https://meta.discourse.org/t/cannot-update-text-for-js-composer-error-post-length/254611/5 "2023-02-10T12:19:23Z")

</div>

For some reason I couldn’t get this to work, the confirmation dialog was not opening because JS error ‘get\_attributes’, the dialog element was null.

But then I turned the safe-mode, check if it was working and everything was updated automatically. I turned off safe-mode, went back to my theme and again, all was working as intended.

So safe-mode fixed it I guess. And there is no more JS error mentioned above. (Should have tried with safe-mode in the first place, smh).

Thanks for your help!
