lhkjacky
(Jacky)
March 15, 2021, 2:21am
1
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.
I have two Question:
Is it possible to fix the Group Message Error for those non-English group?
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.
1 Like
techAPJ
(Arpit Jalan)
March 15, 2021, 10:53am
3
I am unable to repro this on latest Discourse version.
If you update your locale to English then the group name will be auto-updated to “staff” in 12 hours via EnsureDbConsistency
scheduled job.
2 Likes
lhkjacky
(Jacky)
March 15, 2021, 3:06pm
4
Thank you for your quick reply.
Here is the error show in Error Log.
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>
’
I have tried re-run the Discourse setup wizard, but problem remain.
I have tired safe-mode with all plugin disable, but problem remain.
I have also tried set the discourse back to English and Trigger Jobs::EnsureDbConsistency in /sidekiq/scheduler
but those group name still remain in Japanese.
techAPJ
(Arpit Jalan)
March 17, 2021, 4:20am
5
: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.
lhkjacky
(Jacky)
March 18, 2021, 12:44am
6
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.
techAPJ
(Arpit Jalan)
March 18, 2021, 1:54am
7
I am still not able to repro this issue. For me the browser is percent URL encoding the link like so:
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.
techAPJ
(Arpit Jalan)
March 19, 2021, 5:33am
8
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.
lhkjacky
(Jacky)
March 19, 2021, 6:18am
9
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.
2 Likes
cylau1996
(Lau Chi Yung)
May 12, 2021, 1:49am
10
I am having exactly the same problem. This issue has been a while during which I have updated discourse several times.
I have tried switching locale to both English and 中文(TW), both Google Chrome and Firefox
2 Likes
sam
(Sam Saffron)
May 12, 2021, 2:02am
11
We are unable to reproduce this, what are the exact step needed to make this happen?
3 Likes
hawm
(Hawm)
May 16, 2021, 7:35am
12
It happens to me when I disable unicode usernames
after I set the unicode name for a group.
7 Likes
cylau1996
(Lau Chi Yung)
May 24, 2021, 3:35am
13
Thanks a lot! My problem is now gone after enabling unicode usernames.
4 Likes