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

Loss of WCM Images when publish content after an upgrade to DXP



      Steps to reproduce it:

      1. Startup a Liferay 6.1 (you can use other version like 6.2 or 6.0)
      2. Create a WCM Structure with an image field.
      3. Create a template for that structure
      4. Create an article for that structure and fill the image field
      5. Upgrade to DXP
      6. Open WCM editor for previous article and realize that you see the image preview
      7. Publish the article and check the editor again.

      You can't see the image preview

      Expected results:
      You can see the image preview.

      Technical notes:
      The issue is caused by the fact that we don't add languageId value for JournalArticleImage in previous Liferay versions when we add a new image if the field isn't localized. Now, in com.liferay.journal.service.impl.JournalArticleLocalServiceImpl#formatImage we call journalArticleImageLocalService.getArticleImageId to get the previous image using the language and it will never find the old image. That method getArticleImageId also generates a new record if there is no image! For those reasons previous image is not found and, if you don't add a new image, the new article version loses the image.




            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created:
                Days since last comment:
                3 years, 16 weeks, 1 day ago


                Version Package
                7.0.0 DXP FP14
                7.0.0 DXP SP3
                7.0.3 CE GA4
                7.0.X EE