Legacy Knowledge Base
Published Jul. 2, 2025

The LAR file could not be imported because it requires page templates or site templates

Written By

Roberto Díaz

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

While we make every effort to ensure this Knowledge Base is accurate, itmay not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with anyfeedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.

Issue

  • "The LAR file could not be imported because it requires page templates or site templates" error message apprears when the user is importing pages from different Liferay systems.

 

Environment

DXP 7.0 or higher

 

Resolution

When importing pages, in some cases we could obtain this error message. "The LAR file could not be imported because it requires page templates or site templates"

This is produced because this page importation requires the page or the site templates used in the origin system to be imported in the destiny system.

It also applies to the DEFAULT TEMPLATES because this templates could be changed, so the origin system status of this default template could be different to the destiny system current status. Even if they are DEFAULT TEMPLATES, ONCE THEY ARE CREATED IN DIFFERENT SYSTEMS, THEY ARE CONSIDERED DIFFERENT TEMPLATES.

The required templates appear in the message. Let's see an example (in spanish):

El archivo Páginas_privadas-20210524072117010.lar no puede importarse.
No pudo importarse el archivo LAR porque requiere plantillas de página o de sitio que no se han encontrado. Por favor, importe las siguientes plantillas de forma manual:
Plantilla del sitio web: Sitio de intranet(143ab40c-61a8-8791-5111-e3d516da3e3a)

The last paragraph specifies the required template showing the title and it's uuid: Sitio de intranet(143ab40c-61a8-8791-5111-e3d516da3e3a)

To solve the issue you only have to export and import this template. (see https://help.liferay.com/hc/es/articles/360029132551-Importing-Exporting-Sites-and-Content#export-templates for more details)

 

 

 

 

Did this article resolve your issue ?

Legacy Knowledge Base