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

Absolute link is created if file is uploaded through Web Content portlet's add documents and media asset

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: No Longer Reproducible
    • Affects Version/s: 7.0.X EE
    • Fix Version/s: 7.0.X EE, Master
    • Component/s: Item Selector
    • Labels:
      None
    • Fix Priority:
      3
    • Sprint:
      Collab 4

      Description

      Issue
      LPS-70143 introduced new functionality to Alloy Editor where we can highlight text, click on the hyperlink icon, then click on the folder icon to pull up existing Documents and Media assets, or to add Documents and Media assets. There seems to be an inconsistency in the Documents and Media link creation.

      • If we create text, select the hyperlink option, then select an existing file from Documents and Media, then the link will be generated as a relative URL:
        /documents/20143/0/1492397344.png/a1ffed25-1d9d-8916-fc4f-1ab7ed55a024?version=1.0&t=1492412809481

      Steps to Reproduce
      1. Start up a clean DXP + DE-13 environment
      2. Sign in as test@liferay.com
      3. Go to Product Menu > Liferay DXP (Site) > Content > Documents and Media
      4. Add a new file
      5. Go to Product Menu > Liferay DXP (Site) > Content > Web Content
      6. In the text box, add text like "abc" and then highlight it
      7. Once the text is highlighted, click the hyperlink icon, then click on the folder icon to access an existing Documents and Media asset
      8. Select the document uploaded in steps 3-4, and choose it
      9. Assert that the URL is generated with a relative URL (e.g. /documents/20143/0/1492397344.png/a1ffed25-1d9d-8916-fc4f-1ab7ed55a024?version=1.0&t=1492412809481)
      10. Add a new line of text like "def", and highlight it
      11. Once the text is highlighted, click the hyperlink icon, then click on the folder icon to access Documents and Media, then Add a new file
      12. Upload a new file, then choose it

      Actual Results
      If we upload a file through the Documents and Media interface in Alloy Editor, the generated URL will have an absolute path http://localhost:4080/documents/20143/0/1492397344.png/a1ffed25-1d9d-8916-fc4f-1ab7ed55a024?version=1.0&t=1492412809481)

      Expected Results
      Whether uploading via Documents and Media interface in Alloy Editor, or selecting an existing file, the generated URL will have a consistent path, most likely a relative path.

        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:
                  3 years, 13 weeks, 3 days ago

                  Packages

                  Version Package
                  7.0.X EE
                  Master