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:
Will look like:
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.
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.