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

Exporting and importing a Documents & Media URL always append UUID to the imported URL even if it was not there to begin with

    Details

      Description

      Description
      When referencing a file entry in Documents and Media, some users may prefer not to include the UUID in the URL, to ensure that the URL is referencing the latest version of the file entry rather than the version that has a specific UUID. However, when exporting and importing such a URL, the UUID is always included in the imported URL regardless of whether or not it was included in the exported URL.

      Steps to Reproduce
      1. Start up Liferay and log in as the admin user.
      2. Upload any image to Document and Media.
      3. From the details page, copy its URL:

      http://localhost:8080/documents/35917/0/LBDLC.png/50e83bfa-4e06-f920-e2ad-814439b8dff0?t=1625725863442
      

      4. Create a new Web Content Article called "Test". In the source view for the Web Content Article, add the following, using the above URL, but with the UUID and timestamp removed:

      <a href="http://localhost:8080/documents/35917/0/LBDLC.png">Link to Document</a>
      

      Note it's the path without the UUID or timestamp sections.
      5. Publish the article.
      6. From Publishing > Export, export the site (all defaults).
      7. Download the generated lar file.
      8. Create a new site S2.
      10. From Publishing > Import, import the lar file (all defaults).
      12. Go to Content > Web Content
      13. Edit the "Test" web content article and access the Source view.
      14. Note the URL has now changed and it contains the UUID:

      <a href="http://localhost:8080/documents/35917/0/LBDLC.png/50e83bfa-4e06-f920-e2ad-814439b8dff0">Link to Document</a>
      

      Expected Result: The UUID would not be added to the link since it was not there originally.
      Actual Result: The UUID has been added to the link, even though it was not there originally.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              joyce.wang Joyce Wang
              Reporter:
              michael.bowerman Michael Bowerman
              Participants of an Issue:
              Recent user:
              Sophia Zhang
              Engineering Assignee:
              Michael Bowerman
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                12 weeks, 2 days ago

                  Packages

                  Version Package
                  7.2.10 DXP FP15
                  7.2.X
                  7.3.X
                  7.4.2 CE GA3 DXP 7,4
                  7.4.3.4 CE GA4
                  7.4.13 DXP GA1
                  Master