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

Repeatable web content fields are not replaced correctly during export and import

Details

    Description

      Reproduction steps:

      1. Set up DXP 7.2 or 7.3 with the latest fix pack
      2. Go to Control Panel --> Sites --> Sites and create a blank site (Site1).
      3. In Site1 go to Content & Data --> Web Content and add basic web content.
      4. Go to Web Content --> Structures and create a structure with a web content field and make it repeatable.
      5. Go to web content and add web content based on the structure and in the content field select the created basic web content.
      6. Go to Publishing --> Export and click on the "+" Custom Export and export the Site, then download the LAR.
      7. In another instance with the same configuration but a different database, create a blank Site (Site2).
      8. In Site2, go to publishing --> Import and import the downloaded LAR
      9. Go to Content & Data --> Web Contents and edit the web content created from the structure.

      Actual Result: The web content field is displayed as deleted. You will see the note:

      The selected web content was deleted.


      Expected Result: The web content should be successfully imported and the web content field should be available.

      Notes:

      • The issue is not reproducible in current master version. However, there are issues here as well.
      • The first issue is that JournalArticleExportImportContentProcessor does not handle arrays returned by field.getValue(locale). It always expects and tries to parse a JSON value. In this case an array will look like this: "[Ljava.lang.String;@567182b6". This is invalid and throws an exception. This is also reproducible in master, but another replacement running right after this solves the issue.
      • The error message for the field is added here: JournalConverterImpl.java#L1172
      • The strange thing is that the classPK is replaced correctly even in 7.3, but the groupId is not. While in master, we don't even have a groupId in this field.

      Attachments

        Issue Links

          Activity

            People

              marcell.weller Marcell Weller (Inactive)
              vendel.toreki Vendel Töreki
              Kiyoshi Lee Kiyoshi Lee
              Attila Bakay Attila Bakay
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                1 year, 32 weeks, 3 days ago

                Packages

                  Version Package
                  7.1.X
                  7.2.10 DXP FP16
                  7.2.X
                  7.3.10.3 DXP SP3
                  7.3.X