Issue
- Upon upgrading to 7.3, a
LayoutFriendlyURLsExceptionwas thrown on startup, even though no failures were present in the upgrade logs:
WARN [Portal Dependency Manager Component Executor--1][PortalInstanceLifecycleListenerManagerImpl:146] Unable to register portal instance {mvccVersion=4, companyId=20101, accountId=20101, webId=liferay.com, mx=website.org, homeURL=, logoId=0, system=false, maxUsers=0, active=true}
com.liferay.portal.kernel.exception.LayoutFriendlyURLsException: com.liferay.portal.kernel.exception.LayoutFriendlyURLException
[...]
Caused by: com.liferay.portal.kernel.exception.LayoutFriendlyURLException
- I'm not sure why there is no home URL value in this error (homeURL=), because a layout with the name
homeand afriendlyURLof/homealready exist
Environment
- 7.3
Resolution
For cases where the root cause matches what is described below in the additional information section, there are two possible resolutions:
- Change the default layout name in the property
default.guest.public.layout.name=hometo another guest layout name. - Make at least 1 layout on the guest site not hidden from the navigation menu using the following steps:
- Go to the Guest Site > Site Builder > Pages, Select the 3 dots next to a page and go to Configure
- Uncheck "Hidden from Navigation Menu Widget"
Additional Information
- This issue was caused by a guest site without any layouts in the navigation menu, which triggered Liferay to try to add a new layout using the following property:
default.guest.public.layout.name=home. - Because a layout with the name
homeand afriendlyURLof/homealready existed, Liferay was unable to create a new layout with the name "home" for the guest site, and theLayoutFriendlyURLsExceptionwas thrown.