Cannot publish or import site (due to missing references) when asset publisher shows displays from another site
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
- An asset publisher in a site A can be configured to show assets from site A itself and from other sites (B, C, ...).
- If such a site A is then exported and imported to a site in another environment, or published to remote live, it might fail due to missing references in the target environment, with a message like this:
The file Public_Pages-20210415155651283.lar cannot be imported.
There are missing references that could not be found in the current site. Please import the following elements first:
- Web Content Article: Web Content from Site B (Referenced by a Portlet: Asset Publisher)
Resolution
-
Why this is happening: When an asset publisher in a site is exported/imported or published to live, it can try to export the assets it shows and it could mark as
missing-reference those assets that belong to other sites.
- Whether the assets shown by the asset publisher are attempted to be exported or not depends on the system settings:
- Enable Dynamic Export (if the asset publisher is configured to show assets dynamically), or
- Enable Manual Export (if the asset publisher is configured to show assets manually).
- These systems settings can be found at Control Panel > Configuration > System Settings > Assets > Asset Publisher.
-
Available solutions: There are two alternative options.
-
Before exporting/importing or publishing to Live, import/publish to the target environments all the missing references specified in the error message, that corresponding to those assets displayed by the asset publisher.
- Note: For dynamically configured asset publishers, there's a system setting, Dynamic Export Limit, that limits the number of assets that are attempted to be exported/published.
-
Uncheck either Enable Dynamic Export or Enable Manual Export to avoid the export of these assets and the missing reference messages.
- Note:With this option, none of the assets shown by the asset publisher will be exported this way, so for them to be shown in the target site they will need to be there already, or be exported/published explicitly.
Did this article resolve your issue ?