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

Journal Article fields of type Image are not properly saved when adding translations to the web content

    Details

      Description

      Steps to reproduce:
      1. Create an structure having a Image field
      2. Create a template to render that structure. Make sure the image field is displayed in the template script
      3. Create a web content. Fill in some image for the default language, then publish
      4. Add a WCD to some page and configure it to show the content created in step 3
      5. Edit the web content. Add a translation to some language. Upload a new image (not "choose from document library")
      6. Publish
      7. Go back to the page created in step 4
      8. Change language that content is displayed in the language you chose in step 5 (for instance, change the URL and prefix it with the locale code)

      Expected behavior:

      • Content is rendered and includes the image you chose for the locale

      Observed behavior

      • Content is rendered and shows a broken image icon
      • Database stores the <dynamic-content> corresponding to that locale, but in a wrong way. Compare:
        <dynamic-content language-id="en_US" alt="" name="ap_setup--tempRandomSuffix--SfhSR4QO.png" title="ap_setup.png" id="21063">
             /image/journal/article?img_id=21063&amp;t=1429808598720
        </dynamic-content>
        

        and

        <dynamic-content language-id="es_ES" alt="" name="arbol-paginas-publicas--tempRandomSuffix--onie1G0K.png" title="arbol-paginas-publicas.png">
             <![CDATA[{"groupId":20181,"title":"arbol-paginas-publicas.png","name":"arbol-paginas-publicas--tempRandomSuffix--onie1G0K.png","uuid":"b5e5c04a-b73e-7bc0-9cbf-1893f561490a","tempFile":true,"alt":""}]]>
        </dynamic-content>
        

        It seems that <dynamic-content> payload gets corrupted for the es_ES locale: instead of a path to /image, there is a CDATA containing json

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lu.liu Lu Liu
              Reporter:
              daniel.sanz Daniel Sanz
              Participants of an Issue:
              Recent user:
              Marta Elicegui
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 23 weeks, 3 days ago

                  Packages

                  Version Package
                  7.0.0 M5