- We want to export our site into a LAR file, but it fails with the below error on the UI:
An unexpected error occurred with the publication process. Please check your portal and publishing configuration.
The Web Content Article: Article1 has missing reference(s) that could not be found during the process.
- The below exception is shown in the server logs:
Caused by: com.liferay.dynamic.data.mapping.exception.NoSuchTemplateException: No DDMTemplate exists with the template key BASIC-WEB-CONTENT in the ancestor groups at
- Liferay DXP 7.0+
- The attached exception usually appears when the template related to the web content is not found, in this case, it's the default Basic Web Content template from the Global site
- Normally on the UI, you can't delete a structure or template that has at least one web content associated to it, an error message will say:
Error:The template cannot be deleted because it is required by one or more template links.
- However, it can happen by an accidental API call or deleting it directly from the database (Direct database modifications are not supported)
- Verify the issue by checking your database's
ddmtemplatetable and see if there is a record with the '
- If not, then you will need to restore it with a workaround to override the reference checking:
- Please download the appropriate version of DXP bundle by going to the Liferay Help Center Homepage, select the DXP product -> Downloads tab -> Latest Release
- Start the bundle
- Export the Global site's web content portlet
- Then import it in your environment's Global site's web content section.
- After that, you will be able to export your site
- The restored template has a different unique key and it isn't associated with Article1, therefore you will be able to delete it from the UI without any error messages.
- If you create new basic web contents, the template will be protected again against deleting it from the UI