Discourse Assign needs support for Unicode group names

סיכום מבוסס בינה מלאכותית

The discussion addresses a bug where the Discourse-Assign plugin triggers a 500 Error when used with non-English characters, specifically Simplified Chinese. The issue arises because the Jobs::EnsureDbConsistency job replaces Automatic group names with localized versions, which the plugin cannot handle correctly. Noble_Fish explains that a temporary workaround involves setting the default language to English, running the consistency job, and then switching back to the target language. However, this is unreliable as the periodic job will eventually revert the names, causing the error to recur. zogstrip acknowledged the report and confirmed that the issue will be resolved by Discourse Pull Request #37843.

The issue of Discourse-Assign having poor support for non-English characters leading to a 500 Error seems to be a common topic, so here we will only discuss a problem that arises in a rather embarrassing combination of circumstances:

Discourse has a useful auxiliary feature—it replaces strings on the page with localized names each time it runs Jobs::EnsureDbConsistency. This should be praised as an absolutely user-friendly feature, but in this case, it can do more harm than good: Taking Simplified Chinese as an example, we first adjust the default language to this non-English language, then run Jobs::EnsureDbConsistency. Subsequently, it will change the names of Automatic groups, and then when users open the Assigned page for that group, it triggers a 500 Error.


In summary, to use Discourse-Assign normally in these languages, you need to first set the default language to English and run Jobs::EnsureDbConsistency so that the group names are in English, and then adjust the default language back to the target language to make the Full Name become Chinese.


However, since Jobs::EnsureDbConsistency runs periodically under normal circumstances, the next time it is triggered, the names of Automatic groups will revert to the target language, again causing the Assigned page to trigger a 500 Error. :upside_down_face:

3 לייקים

Thanks for the report, it will be fixed by

https://github.com/discourse/discourse/pull/37843

2 לייקים

This topic was automatically closed after 2 days. New replies are no longer allowed.