- Deploy the Resource Importer plugin, then deploy the attached sample theme (this is needed to generate a preloaded web content structure, as Resources Importer creates resources as preloaded intentionally)
- Add an Asset Publisher to a page
- Configure the Asset Publisher so that it displays Web Content Articles based on the "Basic Web Content - 2016-12-23" structure that was imported by Resources Importer, and also to order the results by a field of this structure
- Check the AP portlet's preferences in the portletpreferences database table: the ID of the DDMStructure for "Basic Web Content - 2016-12-23" should be the value of the classTypeIds preference and should also be there in the orderByColumn1 preference value
- Export the entire site into a LAR
- Start a separate portal on an empty database (or shut down the current one, wipe out the database and start it up again on the empty one)
- Deploy the Resource Importer plugin, then deploy the attached sample theme
- Import the the LAR into a site
- Check the AP portlet's preferences in the portletpreferences database table
Result: The value of classTypeIds preferences is the uuid of the DDMStructure from the source portal and also the orderByColumn1 value. They didn't get changed to the actual structure's ID. If you check the AP portlet on the imported page, it lost it's previous configuration and also a NoSuchStructureException is thrown in the log.
During export we replace the structure's ID to the structure's UUID in the portletPreferences, and we add the structure as a missing reference as it's in the Global group. However, since the referenced structure is "preloaded", the import doesn't fail but succeeds. During import, we try to fetch the structure by the UUID in the portletPreferences from the target group and the Global group, but the UUID of the structure is different, since it's a completely different portal database.
We had a similar issue in
for DLFileEntryTypes, so the pattern of that fix can be used to solve this. We need another attempt to fetch the structure from the Global group by it's structure key if it's preloaded. LPS-42856