Issue
We encountered an error while importing a site from the production environment into the development environment:
There are missing references that could not be found in the Live Environment. Please publish again to Live ensuring the following elements are published from their own environment:
- Dynamic Data Mapping Structure: <name of a FieldSet> (Referenced by a Dynamic Data Mapping Structure: <name of an structure>
This error seems to occur when exporting a Custom Field Set created within a structure using the "Create Field Set" option.
Environment
- DXP 7.4
- Quarterly Releases
- 2023.Q3 to 2024.Q4
- 2024.Q1 to 2024.Q4
Resolution
When editing a structure in a site, the "Field Sets" section displays structures from both the current site and the Global site. So to create "Field Sets," you could also simply create separate structures and then, add them in other structure from the "Field Sets" section.
While it might seem counterintuitive, creating a Field Set within a structure actually creates a new structure in the Global site. This behavior is not explicitly indicated in the user interface.
Consequently, exporting a structure that utilizes these Field Sets results in broken references to the Global site within the LAR file.
Possible solutions
To successfully import the LAR into the target Liferay environment, you'll need to transfer the Custom Field Set structure from the source Global site to the destination Global site. This ensures that the imported LAR can find the necessary structures with matching UUIDs:
- In the source Liferay environment, you need to go to the Global site and export the structures of that environment.
- Then you need to import the exported structures into the destination Liferay environment. You would have two options here:
- Import them into Global and replicate the same structure as in the source site.
- Import them into the site where you want to import the LAR that is giving you problems.