# Niet-Engelse groepsnaam veroorzaakt Error 500 voor groepsbericht

**URL:** https://meta.discourse.org/t/non-english-group-name-cause-error-500-for-group-message/183244
**Category:** Support
**Created:** [15 maart 2021 om 02:21 UTC](https://meta.discourse.org/t/non-english-group-name-cause-error-500-for-group-message/183244 "2021-03-15T02:21:34Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![lhkjacky](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhkjacky/32/204198_2.png) [@lhkjacky](https://meta.discourse.org/u/lhkjacky)
#### Post date: [15 maart 2021 om 02:21 UTC](https://meta.discourse.org/t/non-english-group-name-cause-error-500-for-group-message/183244/1 "2021-03-15T02:21:34Z")

</div>

My discourse default language is set to Japanese.  
And some of the default Group names have converted to Japanese, the group url (Slug) are in Japanese too.

For example, The staff group url is `/g/スタッフ`  
Staff activity page’s url is `/g/スタッフ/activity/posts`

And all the groups with non-English name cannot visit the Group Message page. `/g/スタッフ/messages`  
When try to access those pages, Server Error 500 message appear.

I have tried finding those text in customize text page, but I don’t think I can customize it.

It seem to be some kind of bugs, because when I change the language back to English and refresh the page, those Non-English Groups name are still remain in Japanese.

 ![2021-03-15_101148](https://global.discourse-cdn.com/meta/original/3X/b/f/bfd941a27e19aee89d623db9aef0186ff2f64170.jpeg)

 ![2021-03-15_101159](https://global.discourse-cdn.com/meta/original/3X/0/9/0963cbefaf8b8dccfcc2661214576e150810ab25.jpeg)

 ![2021-03-15_101421](https://global.discourse-cdn.com/meta/original/3X/c/8/c88c5f3bc0e2a5e2c74fbca11a3ff28e9884dfce.jpeg)

I have two Question:

1. Is it possible to fix the Group Message Error for those non-English group?

2. I think Discourse is not allow non-English Group name. So how could I change back those name back to English ?

PS: I have updated to latest version and rebuild the app but the problem remain.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [15 maart 2021 om 10:53 UTC](https://meta.discourse.org/t/non-english-group-name-cause-error-500-for-group-message/183244/3 "2021-03-15T10:53:09Z")

</div>

> [@lhkjacky](#):
>
> Is it possible to fix the Group Message Error for those non-English group?

I am unable to repro this on latest Discourse version. 🤔

 ![Screenshot 2021-03-15 at 16.20.23](https://global.discourse-cdn.com/meta/original/3X/2/f/2f63858d70b323cbd04516691120368f91d20575.jpeg)

> [@lhkjacky](#):
>
> I think Discourse is not allow non-English Group name. So how could I change back those name back to English ?

If you update your locale to English then the group name will be auto-updated to “staff” in 12 hours via [`EnsureDbConsistency`](https://github.com/discourse/discourse/blob/bdbee36961a88c1b6b44ade60f7a637fb655f5ac/app/jobs/scheduled/ensure_db_consistency.rb) scheduled job.

---

<div class="post-metadata">

### Author: ![lhkjacky](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhkjacky/32/204198_2.png) [@lhkjacky](https://meta.discourse.org/u/lhkjacky)
#### Post date: [15 maart 2021 om 15:06 UTC](https://meta.discourse.org/t/non-english-group-name-cause-error-500-for-group-message/183244/4 "2021-03-15T15:06:49Z")

</div>

Thank you for your quick reply. 😀

Here is the error show in Error Log. 🤔

 ![2021-03-15_225837](https://global.discourse-cdn.com/meta/original/3X/8/a/8aaf883838a2cf9f4bc21f4cab71ef4e9fd0acbe.jpeg)

```
ActionController::UrlGenerationError (No route matches {:action=>"private_messages_group", :controller=>"list", :format=>"json", :group_name=>"トラストレベル0", :page=>1, :topic_ids=>nil, :username=>"admin"}

```

* * *

```
ActionController::UrlGenerationError (No route matches {:action=>"private_messages_group", :controller=>"list", :format=>"json", :group_name=>"スタッフ", :page=>1, :topic_ids=>nil, :username=>"admin"}, po

```

* * *

```
ActionController::UrlGenerationError (No route matches {:action=>"private_messages_group", :controller=>"list", :format=>"json", :group_name=>"管理者", :page=>1, :topic_ids=>nil, :username=>"admin"}, pos

```

* * *

```
ActionController::UrlGenerationError (No route matches {:action=>"private_messages_group_archive", :controller=>"list", :format=>"json", :group_name=>"管理者", :page=>1, :topic_ids=>nil, :username=>"admi

```

* * *

# Detail:

> **Info**
>
> - ActionController::UrlGenerationError (No route matches {:action=\>“private\_messages\_group”, :controller=\>“list”, :format=\>“json”, :group\_name=\>“管理者”, :page=\>1, :topic\_ids=\>nil, :username=\>“admin”}, possible unmatched constraints: [:group\_name])
> - app/controllers/list\_controller.rb:416:in `public\_send’
> - app/controllers/list\_controller.rb:416:in `construct\_url\_with’
> - app/controllers/list\_controller.rb:175:in `message\_route’
> - app/controllers/list\_controller.rb:160:in `block in generate\_message\_route’
> - app/controllers/application\_controller.rb:358:in `block in with\_resolved\_locale’
> - app/controllers/application\_controller.rb:358:in `with\_resolved\_locale’
> - lib/middleware/omniauth\_bypass\_middleware.rb:68:in `call’
> - lib/content\_security\_policy/middleware.rb:12:in `call’
> - lib/middleware/anonymous\_cache.rb:355:in `call’
> - config/initializers/100-quiet\_logger.rb:23:in `call’
> - config/initializers/100-silence\_logger.rb:31:in `call’
> - lib/middleware/enforce\_hostname.rb:23:in `call’
> - lib/middleware/request\_tracker.rb:177:in `call’

> **Backtrace**
>
> - actionpack (6.0.3.5) lib/action\_dispatch/journey/formatter.rb:57:in `generate’
> - actionpack (6.0.3.5) lib/action\_dispatch/routing/route\_set.rb:738:in `generate’
> - actionpack (6.0.3.5) lib/action\_dispatch/routing/route\_set.rb:769:in `generate’
> - actionpack (6.0.3.5) lib/action\_dispatch/routing/route\_set.rb:816:in `url\_for’
> - actionpack (6.0.3.5) lib/action\_dispatch/routing/route\_set.rb:269:in `call’
> - actionpack (6.0.3.5) lib/action\_dispatch/routing/route\_set.rb:326:in `block in define\_url\_helper’
> - app/controllers/list\_controller.rb:416:in `public\_send’
> - app/controllers/list\_controller.rb:416:in `construct\_url\_with’
> - app/controllers/list\_controller.rb:175:in `message\_route’
> - app/controllers/list\_controller.rb:160:in `block in generate\_message\_route’
> - actionpack (6.0.3.5) lib/action\_controller/metal/basic\_implicit\_render.rb:6:in `send\_action’
> - actionpack (6.0.3.5) lib/abstract\_controller/base.rb:195:in `process\_action’
> - actionpack (6.0.3.5) lib/action\_controller/metal/rendering.rb:30:in `process\_action’
> - actionpack (6.0.3.5) lib/abstract\_controller/callbacks.rb:42:in `block in process\_action’
> - activesupport (6.0.3.5) lib/active\_support/callbacks.rb:112:in `block in run\_callbacks’
> - app/controllers/application\_controller.rb:358:in `block in with\_resolved\_locale’
> - i18n (1.8.9) lib/i18n.rb:314:in `with\_locale’
> - app/controllers/application\_controller.rb:358:in `with\_resolved\_locale’
> - activesupport (6.0.3.5) lib/active\_support/callbacks.rb:121:in `block in run\_callbacks’
> - activesupport (6.0.3.5) lib/active\_support/callbacks.rb:139:in `run\_callbacks’
> - actionpack (6.0.3.5) lib/abstract\_controller/callbacks.rb:41:in `process\_action’
> - actionpack (6.0.3.5) lib/action\_controller/metal/rescue.rb:22:in `process\_action’
> - actionpack (6.0.3.5) lib/action\_controller/metal/instrumentation.rb:33:in `block in process\_action’
> - activesupport (6.0.3.5) lib/active\_support/notifications.rb:180:in `block in instrument’
> - activesupport (6.0.3.5) lib/active\_support/notifications/instrumenter.rb:24:in `instrument’
> - activesupport (6.0.3.5) lib/active\_support/notifications.rb:180:in `instrument’
> - actionpack (6.0.3.5) lib/action\_controller/metal/instrumentation.rb:32:in `process\_action’
> - actionpack (6.0.3.5) lib/action\_controller/metal/params\_wrapper.rb:245:in `process\_action’
> - activerecord (6.0.3.5) lib/active\_record/railties/controller\_runtime.rb:27:in `process\_action’
> - actionpack (6.0.3.5) lib/abstract\_controller/base.rb:136:in `process’
> - actionview (6.0.3.5) lib/action\_view/rendering.rb:39:in `process’
> - rack-mini-profiler (2.3.1) lib/mini\_profiler/profiling\_methods.rb:111:in `block in profile\_method’
> - actionpack (6.0.3.5) lib/action\_controller/metal.rb:190:in `dispatch’
> - actionpack (6.0.3.5) lib/action\_controller/metal.rb:254:in `dispatch’
> - actionpack (6.0.3.5) lib/action\_dispatch/routing/route\_set.rb:50:in `dispatch’
> - actionpack (6.0.3.5) lib/action\_dispatch/routing/route\_set.rb:33:in `serve’
> - actionpack (6.0.3.5) lib/action\_dispatch/journey/router.rb:49:in `block in serve’
> - actionpack (6.0.3.5) lib/action\_dispatch/journey/router.rb:32:in `each’
> - actionpack (6.0.3.5) lib/action\_dispatch/journey/router.rb:32:in `serve’
> - actionpack (6.0.3.5) lib/action\_dispatch/routing/route\_set.rb:834:in `call’
> - lib/middleware/omniauth\_bypass\_middleware.rb:68:in `call’
> - rack (2.2.3) lib/rack/tempfile\_reaper.rb:15:in `call’
> - rack (2.2.3) lib/rack/conditional\_get.rb:27:in `call’
> - rack (2.2.3) lib/rack/head.rb:12:in `call’
> - lib/content\_security\_policy/middleware.rb:12:in `call’
> - lib/middleware/anonymous\_cache.rb:355:in `call’
> - rack (2.2.3) lib/rack/session/abstract/id.rb:266:in `context’
> - rack (2.2.3) lib/rack/session/abstract/id.rb:260:in `call’
> - actionpack (6.0.3.5) lib/action\_dispatch/middleware/cookies.rb:648:in `call’
> - actionpack (6.0.3.5) lib/action\_dispatch/middleware/callbacks.rb:27:in `block in call’
> - activesupport (6.0.3.5) lib/active\_support/callbacks.rb:101:in `run\_callbacks’
> - actionpack (6.0.3.5) lib/action\_dispatch/middleware/callbacks.rb:26:in `call’
> - actionpack (6.0.3.5) lib/action\_dispatch/middleware/actionable\_exceptions.rb:18:in `call’
> - actionpack (6.0.3.5) lib/action\_dispatch/middleware/debug\_exceptions.rb:32:in `call’
> - actionpack (6.0.3.5) lib/action\_dispatch/middleware/show\_exceptions.rb:33:in `call’
> - logster (2.9.6) lib/logster/middleware/reporter.rb:43:in `call’
> - railties (6.0.3.5) lib/rails/rack/logger.rb:37:in `call\_app’
> - railties (6.0.3.5) lib/rails/rack/logger.rb:28:in `call’
> - config/initializers/100-quiet\_logger.rb:23:in `call’
> - config/initializers/100-silence\_logger.rb:31:in `call’
> - actionpack (6.0.3.5) lib/action\_dispatch/middleware/remote\_ip.rb:81:in `call’
> - actionpack (6.0.3.5) lib/action\_dispatch/middleware/request\_id.rb:27:in `call’
> - lib/middleware/enforce\_hostname.rb:23:in `call’
> - rack (2.2.3) lib/rack/method\_override.rb:24:in `call’
> - actionpack (6.0.3.5) lib/action\_dispatch/middleware/executor.rb:14:in `call’
> - rack (2.2.3) lib/rack/sendfile.rb:110:in `call’
> - actionpack (6.0.3.5) lib/action\_dispatch/middleware/host\_authorization.rb:76:in `call’
> - rack-mini-profiler (2.3.1) lib/mini\_profiler/profiler.rb:373:in `call’
> - message\_bus (3.3.4) lib/message\_bus/rack/middleware.rb:61:in `call’
> - lib/middleware/request\_tracker.rb:177:in `call’
> - railties (6.0.3.5) lib/rails/engine.rb:527:in `call’
> - railties (6.0.3.5) lib/rails/railtie.rb:190:in `public\_send’
> - railties (6.0.3.5) lib/rails/railtie.rb:190:in `method\_missing’
> - rack (2.2.3) lib/rack/urlmap.rb:74:in `block in call’
> - rack (2.2.3) lib/rack/urlmap.rb:58:in `each’
> - rack (2.2.3) lib/rack/urlmap.rb:58:in `call’
> - unicorn (5.8.0) lib/unicorn/http\_server.rb:634:in `process\_client’
> - unicorn (5.8.0) lib/unicorn/http\_server.rb:732:in `worker\_loop’
> - unicorn (5.8.0) lib/unicorn/http\_server.rb:548:in `spawn\_missing\_workers’
> - unicorn (5.8.0) lib/unicorn/http\_server.rb:144:in `start’
> - unicorn (5.8.0) bin/unicorn:128:in `\<top (required)\>’
> - vendor/bundle/ruby/2.7.0/bin/unicorn:23:in `load’
> - vendor/bundle/ruby/2.7.0/bin/unicorn:23:in `<main>`’

* * *

1. I have tried re-run the Discourse setup wizard, but problem remain.

2. I have tired safe-mode with all plugin disable, but problem remain.  

> [@techAPJ](#):
>
> If you update your locale to English then the group name will be auto-updated to “staff” in 12 hours via [`EnsureDbConsistency`](https://github.com/discourse/discourse/blob/bdbee36961a88c1b6b44ade60f7a637fb655f5ac/app/jobs/scheduled/ensure_db_consistency.rb) scheduled job.

1. I have also tried set the discourse back to English and Trigger J`obs::EnsureDbConsistency in /sidekiq/scheduler` but those group name still remain in Japanese. 🤔

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [17 maart 2021 om 04:20 UTC](https://meta.discourse.org/t/non-english-group-name-cause-error-500-for-group-message/183244/5 "2021-03-17T04:20:37Z")

</div>

> :group\_name=\>“スタッフ”

Looks like the `group_name` parameter is not URL-encoded. What browser are you using.

I am unable to repro this on latest Chrome version.

---

<div class="post-metadata">

### Author: ![lhkjacky](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhkjacky/32/204198_2.png) [@lhkjacky](https://meta.discourse.org/u/lhkjacky)
#### Post date: [18 maart 2021 om 00:44 UTC](https://meta.discourse.org/t/non-english-group-name-cause-error-500-for-group-message/183244/6 "2021-03-18T00:44:03Z")

</div>

I am using Chrome with latest update. 😀  
I also tried with Firefox and Opera, all of them have the same problem.

I have found that others have the same problem as well. 🤔

> [@Error 500 on show group administrator message](https://meta.discourse.org/t/error-500-on-show-group-administrator-message/129326):
>
> Go to [https://example.com/g/администраторы](https://example.com/g/%D0%B0%D0%B4%D0%BC%D0%B8%D0%BD%D0%B8%D1%81%D1%82%D1%80%D0%B0%D1%82%D0%BE%D1%80%D1%8B) or english [https://example.com/g/administrators](https://example.com/g/administrators) and click message return error: Ошибка: 500 Internal Server Error

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [18 maart 2021 om 01:54 UTC](https://meta.discourse.org/t/non-english-group-name-cause-error-500-for-group-message/183244/7 "2021-03-18T01:54:23Z")

</div>

I am still not able to repro this issue. For me the browser is percent URL encoding the link like so:

```plaintext
http://localhost:9292/topics/private-messages-group/arpit/%E3%82%B9%E3%82%BF%E3%83%83%E3%83%95.json

```

… and that results in proper response from server.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [19 maart 2021 om 05:33 UTC](https://meta.discourse.org/t/non-english-group-name-cause-error-500-for-group-message/183244/8 "2021-03-19T05:33:32Z")

</div>

What’s your browser and OS default locale? Is it English or Japanese?

I’m wondering why the percent URL encoding is not happening for you in browser.

---

<div class="post-metadata">

### Author: ![lhkjacky](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhkjacky/32/204198_2.png) [@lhkjacky](https://meta.discourse.org/u/lhkjacky)
#### Post date: [19 maart 2021 om 06:18 UTC](https://meta.discourse.org/t/non-english-group-name-cause-error-500-for-group-message/183244/9 "2021-03-19T06:18:29Z")

</div>

My Wins 10 have both Japanese and Chinese language pack installed.  
Currently, the Windows is set to Chinese as default.  
My Chrome is in Japanese but Firefox is in English. 😅

* * *

After multiple testing, I have found out some strange behavior of the group names.

For example, in Customize → Text, I set  
`groups.default_names.trust_level_0` = `トラストレベル0`  
The url will be `/g/%E3%83%88%E3%83%A9%E3%82%B9%E3%83%88%E3%83%AC%E3%83%99%E3%83%AB4/messages`, and I get 500 Internal Server Error.

* * *

If I change the `groups.default_names.trust_level_0` = `trust_level_0` and wait 1 day, The url will change back to `/g/trust_level_0/messages/` and I can access the page without problem.

* * *

If I change to some other word, such as `groups.default_names.trust_level_0` = `Level 0` and wait 1 day, The url will remain unchanged. If the url was in Japanese it will remain in Japanese. If the url was in English, it will remain in English.

* * *

At the moment, I think I will just set all the groups names back to English name and it should fix the problem. The Groups name must have to be identical to the default English name, otherwise the url won’t change back to English.  
For example, a few days ago I set `groups.default_names.admins` to `Admin’, because I forgot to type the “s” after Admin, after few days now, the url is still remains in Japanese.

---

<div class="post-metadata">

### Author: ![cylau1996](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cylau1996/32/172779_2.png) [@cylau1996](https://meta.discourse.org/u/cylau1996)
#### Post date: [12 mei 2021 om 01:49 UTC](https://meta.discourse.org/t/non-english-group-name-cause-error-500-for-group-message/183244/10 "2021-05-12T01:49:03Z")

</div>

I am having exactly the same problem. This issue has been a while during which I have updated discourse several times.

 ![Screenshot 2021-05-12 at 9.44.00 AM](https://global.discourse-cdn.com/meta/original/3X/a/5/a54c86ae3ca4b19b8177753613eddd63a1dad2d7.png)  
 ![Screenshot 2021-05-12 at 9.44.28 AM](https://global.discourse-cdn.com/meta/original/3X/0/7/07c26ab0f6adef08e67337fac82fd67c408b8c89.png)  
 ![Screenshot 2021-05-12 at 9.50.22 AM](https://global.discourse-cdn.com/meta/optimized/3X/d/4/d4357c2204b12f1e1332b0999bf18bc5a6d9d8bd_2_690x16.png)  
I have tried switching locale to both English and 中文(TW), both Google Chrome and Firefox

---

<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: [12 mei 2021 om 02:02 UTC](https://meta.discourse.org/t/non-english-group-name-cause-error-500-for-group-message/183244/11 "2021-05-12T02:02:37Z")

</div>

We are unable to reproduce this, what are the exact step needed to make this happen?

---

<div class="post-metadata">

### Author: ![hawm](https://avatars.discourse-cdn.com/v4/letter/h/f07891/32.png) [@hawm](https://meta.discourse.org/u/hawm)
#### Post date: [16 mei 2021 om 07:35 UTC](https://meta.discourse.org/t/non-english-group-name-cause-error-500-for-group-message/183244/12 "2021-05-16T07:35:23Z")

</div>

It happens to me when I disable `unicode usernames` after I set the unicode name for a group.

---

<div class="post-metadata">

### Author: ![cylau1996](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cylau1996/32/172779_2.png) [@cylau1996](https://meta.discourse.org/u/cylau1996)
#### Post date: [24 mei 2021 om 03:35 UTC](https://meta.discourse.org/t/non-english-group-name-cause-error-500-for-group-message/183244/13 "2021-05-24T03:35:04Z")

</div>

Thanks a lot! My problem is now gone after enabling unicode usernames.
