Issue
- We have the same category in UAT and Production but the category UUID is different. Therefore, we cannot import the web content lar file which exported from UAT.
Environment
- Liferay DXP 7.4
Resolution
Steps to merge the category from Production to UAT so that the category UUID and assets using this category will be updated in UAT.
- Back up the database in UAT
- Get the Category Id from AssetCategory table in UAT
- Get the Category Id from AssetCategory table in Production
- In Production, export the category into a Lar file
- In UAT, import the Category Lar. At this point, there are two categories with the same name.
- Go to Server Administration > Script and execute the following:
com.liferay.asset.kernel.service.AssetCategoryLocalServiceUtil.mergeCategories(uat_categoryId,prd_categoryId);