Note: please note that Liferay has renamed its Liferay Experience
Could offerings to Liferay SaaS (formerly LXC) and
Liferay PaaS (formerly LXC-SM).
Issue
- The following messages are identified in the logs:
Jun 07 01:20:15.120 build-43 liferay[liferay-ldbgc] com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the primary key 377736
Jun 07 07:13:56.783 build-43 liferay[liferay-ldbgc] com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the primary key 377785
Environment
- Liferay DXP 7.2+
- Liferay PaaS
Resolution
- Sometimes this is caused by orphan layout records left in the database so in order to clean them you can execute the attached groovy script
- Follow this steps:
- Backup your database
- Execute the attached script to find out how many orphan records are found.
- To delete the orphan records modify the line 222, find the variable
_safeMode
and set it to_safeMode=false
- Executing the deletion might cause a warning message:
Someone may be trying to circumvent the permission checker
- To verify if the orphan records were removed you can execute the script again with
_safeMode=true
Additional Information
- Always execute this script in DEV environments first and after all test passed you can replicate on PRD.