Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-70048

Export/Import is incomplete when Asset Publisher is configured to show articles with a preloaded web content structure




      1. 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)
      2. Add an Asset Publisher to a page
      3. 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
      4. 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
      5. Export the entire site into a LAR
      6. 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)
      7. Deploy the Resource Importer plugin, then deploy the attached sample theme
      8. Import the the LAR into a site
      9. 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 LPS-42856 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.


          Issue Links



              steven.gao Steven Gao (Inactive)
              gergely.mathe Gergely Mathe (Inactive)
              Participants of an Issue:
              Recent user:
              Michael Saechang
              0 Vote for this issue
              1 Start watching this issue


                Days since last comment:
                5 years, 4 weeks, 6 days ago


                  Version Package
                  6.2.X EE