Issue
- After changing a site's default language to a non-English locale and disabling English (United States) support, the Admin UI breaks.
- The issue occurs when the "Use Localized URL" option is selected in the Instance SEO Configuration before changing the site's default language.
- Steps to reproduce:
- Create a new site.
- Go to Instance Settings > Content & Data > Pages > SEO and select "Use Localized URL".
- Go to the newly created site's settings > Localization > Languages.
- Select "Define a custom default language and additional available languages for this site".
- Change the "Default Language" to a language other than English (United States) and Save.
- Remove English (United States) from the list of available languages and Save.
- Result: The UI breaks, and a NullPointerException similar to the following is thrown in the logs:
ERROR [http-nio2-8082-exec-45][IncludeTag:119] Current URL /group/<site-name>/~/control_panel/manage... generates exception: Cannot invoke "java.util.Locale.getLanguage()" because "siteDefaultLocale" is null
Environment
- Liferay DXP 2024.Q3.13+
Resolution
-
This issue is fixed by LPD-49011. In case you experience it, we recommend opening a Help Center ticket and requesting a hotfix including this specific fix from Liferay Support.
-
LPD-49011 will also be added to a future DXP release, so consider upgrading as well in case the fix has already been added to a DXP version.