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

Web content structure with localization is saving garbage data in place of images

    Details

      Description

      Note, this issue is resolved unintentionally in master by LPS-67119. The contents of LPS-67119 are a technical task, so we should not backport them as they are not intentionally fixing the bug described in this ticket.

      DESCRIPTION
      Web content structure with localization is saving garbage data in place of images

      STEPS TO REPRODUCE
      1) Create a web content structure with a text field and an image field, and create a template for that structure.
      2) Create a web content with that structure. Add a title and a summary and publish the web content.
      3) Add a translation, and set a new title and a summary for that translation and publish the web content.
      4) Add an image to the English/default translation and publish the web content.
      5) Edit the content and view the translation.
      EXPECTED RESULTS
      No image is copied over and only the 'select' option is available. The content column in the database looks like the following for the translated image field:

      <dynamic-content language-id="es_ES"></dynamic-content>

      ACTUAL RESULTS
      No image is copied over, but there is a "Select", "Clear" and "Preview" button shown. The content column in the database looks like the following for the translated image field:

      <dynamic-content language-id="es_ES" alt="" name="" title="" type=""><![CDATA[{}]]></dynamic-content>

      This bug also adds garbage data to the content that is being saved. This can be observed by clicking on the "options" button (3 dots) and clicking on View Source. For the translation's image data, there is dummy data instead. On every additional save, this dummy data seems to replicate and get very large.

      		<dynamic-content language-id="es_ES" alt="" name="" title="" type=""><![CDATA[{"data":"{\"data\":\"{\\\"data\\\":\\\"\\\"}\",\"alt\":\"\",\"name\":\"\",\"title\":\"\",\"type\":\"\"}","alt":"","name":"","title":"","type":""}]]></dynamic-content>
      

      BRANCH
      Reproducible
      606d9d902aef50ca425f401e51ef30ff8d02e70e
      MASTER
      Not reproducible
      e39901a5c0ad4bbb0554d1b9fd27556c2951c9f4

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 26 weeks, 2 days ago

                Packages

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