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

Web content image not displayed in fragment properly using itemSelector configuration

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Won't Fix
    • Affects Version/s: Master
    • Fix Version/s: None
    • Labels:
      None
    • Fix Priority:
      4

      Description

      Steps to Reproduce:

      1. Add a basic web content and insert an image into the content section
      2. Create a fragment with an itemSelector configuration. Ex:
        {
            "fieldSets": [
        		{
        		"fields": [
        			{
        			"name": "itemSelector1",
        			"type": "itemSelector",
        			"label": "Web Content",
        			"typeOptions": {
        				"itemType" : "com.liferay.journal.model.JournalArticle"
        			     }
        			}
        		   ]
        	     }
        	]
        }
      3. Add html to display the content. Ex:
        <div class="fragment_wc">
          [#if configuration.itemSelector1.content??]
            ${itemSelector1Object.getContent()}
          [/#if]
        </div>
      4. Add a new page and add your created fragment to the page
      5. Click on the fragment configuration
      6. Select your created web content

      Expected Results:
      The image is displayed(When creating the same fragment but with an itemType for a blogs entry, and there exists a blogs entry with an image in the content, the image is displayed)

      Actual Result:
      The html text of the image is shown like "<p><img src="/documents/20118/0/test-image/77b6eca1-30e4-3727-a6c8-20ed7b391efc?t=1576871464860" /></p> <p> </p>"

      Reproduced on:
      Tomcat 9.0.17 + MySQL 5.7 Portal Master GIT ID: 013790a50cbb32218faa89fd071366ed0b8ae0fc

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                brooke.dalton Brooke Dalton
                Reporter:
                brooke.dalton Brooke Dalton
                Participants of an Issue:
                Recent user:
                Brooke Dalton
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  23 weeks, 1 day ago

                  Packages

                  Version Package