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)
Environment
- Liferay DXP 7.0+
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.
- Whether the assets shown by the asset publisher are attempted to be exported or not depends on the system settings:
-
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.
-
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.
Additional Information