Export of site fails with NoSuchTemplateException
Written By
István Gergely-Tárnoki
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
Legacy Article
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Issue
- We want to export our site into a LAR file, but it fails with the below error on the UI:
-
The below exception is shown in the server logs:
Resolution
- 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
ddmtemplate table and see if there is a record with the 'BASIC-WEB-CONTENT' templateKey
-
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
Did this article resolve your issue ?