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

Secondary file uploads to document library do not have portal context prepended to the URL

Details

    Description

      Issue:
      When the portal context is changed, documents uploaded through a document type upload will have the incorrect download URL. The portal context is not automatically appended.

      Steps to reproduce:
      1) Unpack a new 6.1 GA1 Liferay instance.
      2) Change the portal context for the portal. We used /orange when reproducing the issue.
      a) Navigate to <Tomcat home>/webapps.
      b) Rename the folder ROOT to the name of the portal context you will be using. I.e. 'orange'
      c) Create the portal-ext.properties file, and add the following line: portal.ctx=/orange
      d) Boot Liferay bundle. When it has deployed, navigate to localhost:8080/orange
      3) Navigate to the Control Panel, and select the Documents and Media tab. Create a document type that includes a file upload attribute.
      4) Create a document which uses the above document type, uploading both a primary file, as well as a file for the file upload attribute.
      5) Navigate to the Documents and Media, and select the file that was just uploaded.
      6) In the right column the title of the secondary file will be visible. Right click on the link to download the secondary file and copy the URL. 7) Click on the link, the file will not download. Nothing will happen at this point.
      8) Paste the copied URL in a text editor, and add the portal context to the URL. For example:
      http://localhost:8080/documents/ddm/com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata/10510/ddm-fileupload2008
      Will look like:
      http://localhost:8080/party/documents/ddm/com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata/10510/ddm-fileupload2008
      8) Copy and paste the URL into a browser. The file will successfully download.

      Intended Result: When the link is selected, the portal context should be automatically amended and the file should download.
      Actual Result: The link does not download the file because the context is missing from the URL.

      Additional Testing:
      Branch 6.1.x : This issue is reproducible.
      Trunk: In 6.2.x under document types the "File Upload Attribute" is no longer an issue. Hence, this issue is not reproducible in trunk.

      Attachments

        Issue Links

          Activity

            People

              linda.sui Linda Sui
              jonathan.goossen Jonathan Goossen (Inactive)
              Rafaela Nascimento Rafaela Nascimento
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9 years, 27 weeks, 1 day ago

                Packages

                  Version Package
                  6.1.X EE