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

Editing a web content containing an empty structure image field creates bad HTML

    Details

      Description

      Steps to Reproduce:

      1. Create a structure with an image field
      2. Create a template using the structure from step 1 and add the image field to the template
      3. Create a web content using the structure from step 1 Note: Only add a title for the web content. Do not actually upload an image to the image field.
      4. Add Web Content Display portlet to a page
      5. Select the web content created in step 3 to be displayed in the portlet
      6. Using browser developer tools, select the image field text and note that the HTML displayed should look something like this:
        <img src="" alt="Image"></img>
        
      7. Edit the web content from the Web Content Display portlet, but don't modify anything. Simply click the 'Save' button immediately.
      8. Using browser developer tools, observe the HTML for the image field text again. It should now look something like this:
        <img alt":"","data":""}"="" src="{" alt="Image"></img>
        

      Expected Result: If there is still no image uploaded to the image field after editing the web content, the HTML for the field should not change.
      Actual Result: The HTML for the image field is changed even though the web content was not modified in any way.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 35 weeks, 5 days ago

                  Packages

                  Version Package
                  6.2.3 CE GA4
                  6.2.X EE
                  7.0.0 M4