Issue
When navigating from a site with some language configured to other site that don't support that language, a 404 error is shown.
- Create a site "Site-us" and set English as the default language. Remove the other languages.
- From the "Site-us" settings, configure a virtual host for the public-pages / English language: site-us.liferay.com.
- Create an empty public page /home in "Site-us".
- Create another site "Site-es", set Spanish as the default language of this site, and also remove the other languages.
- Create an empty public page /home in "Site-es".
- Access site-us.liferay.com:8080 and sign in.
- Go to manage site pages and, using the site selector, select "Site-es".
- A 404 error is shown.
Environment
- Liferay DXP 7.2, 7.3
Resolution
- To avoid showing a 404 when the URL locale is not supported on the site, set the property:
locale.use.default.if.not.available=true