This issue has been created
There are 2 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-e76f0b17-d091-429a-bd92-b74825ed9da5 XWIKI-22395 Open

Filter locales listed in Administration in order to ensure that the list contains only locales with the correct format

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-53ef35f0-0684-4a01-82e0-b5c89afeee1e Ilie Andriuta created this issue on 06/Aug/24 11:50
 
Summary: Filter locales listed in Administration in order to ensure that the list contains only locales with the correct format
Issue Type: cid:jira-generated-image-avatar-e76f0b17-d091-429a-bd92-b74825ed9da5 Bug
Affects Versions: 15.10.11, 16.6.0
Assignee: Unassigned
Attachments: Brezhoneg_latin.png, Chinese_simplified.png
Components: Administration
Created: 06/Aug/24 11:50
Environment: Windows 11 Pro, Chrome 127, using a local instance of XWiki 16.6.0 on MySQL 8.4, Tomcat 9.0.91
Priority: cid:jira-generated-image-static-major-4961a382-7f47-412e-8e6f-c11d09272f39 Major
Reporter: Ilie Andriuta
Description:

Steps to reproduce

  1. Login as Admin (tested with Java 21 from Oracle)
  2. Go to Administer Wiki > Content > Localization
  3. Set Multilingual to 'Yes'
  4. In Supported Languages and Default Language drop-downs search for locales like "Chinese (Simplified)" or "Brezhoneg (latin, Frans) (Breton (Latin, France))" or others that usually contain the alphabet ('latin', for ex)

Expected results

No warnings should be displayed in the logs, since the locales with wrong format should not be listed for selection.

Actual results

If these added to the Supported Languages and/or Default Language, they generate a huge stacktrace in console, like (partial stacktrace):

E.g. for Chinese (Simplified):

2024-08-06 12:38:24,107 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,107 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,109 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,109 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,206 [XWiki Solr index thread] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,206 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,206 [XWiki Solr index thread] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,207 [XWiki Solr index thread] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,207 [XWiki Solr index thread] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,207 [XWiki Solr index thread] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,207 [XWiki Solr index thread] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,208 [XWiki Solr index thread] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,208 [XWiki Solr index thread] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,209 [XWiki Solr index thread] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,209 [XWiki Solr index thread] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,211 [XWiki Solr index thread] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,211 [XWiki Solr index thread] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,212 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,212 [XWiki Solr index thread] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,212 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,212 [XWiki Solr index thread] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,212 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,213 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,213 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,213 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,213 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,214 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,214 [XWiki Solr index thread] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,217 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,217 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,219 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,219 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,220 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,220 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,238 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences
2024-08-06 12:38:24,238 [qtp1075738627-32 - http://localhost:1511/xwiki/bin/saveandcontinue/XWiki/XWikiPreferences] WARN  c.x.x.XWiki                    - Invalid locale [zh__#Hans] set as default locale in the preferences

 

Full stacktrace available at: https://up1.xwikisas.com/#wbc57NT8KYzsEZl7kyLUNA

 
 

2 updates

 
cid:jira-generated-image-avatar-53ef35f0-0684-4a01-82e0-b5c89afeee1e Changes by Ilie Andriuta on 06/Aug/24 11:51
 
Version: 16.4.1
Component: Localization