[ALF-22009] Download as ZIP download wrong content if there are multiple d:content properties Created: 02-Jul-18  Updated: 09-Nov-18

Status: Need Info
Project: Alfresco
Component/s: Repository
Affects Version/s: 5.2
Fix Version/s: None
Security Level: external (External user)

Type: Bug Priority: Major
Reporter: Igor Blanco Assignee: Igor Blanco
Resolution: Unresolved Votes: 0
Labels: PatchAttached
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File DownloadAsArchive.patch    
Date of First Response:
Triage: To Do


How to reproduce:

  • Create a custom aspect that has a new property of type d:content
  • Create a folder and upload a PDF document there
  • Add the newly created aspect to the document and set the new d:content property to it (for example by adding some text content to it with the javascript console)
  • Download the folder as a ZIP to your local computer and uncompress it
  • Open the uncompressed PDF file

Expected result:

The PDF file should open with the same content as the uploaded file

Actual result:

The opening of the PDF file fails because what was written to the PDF was the last d:content property of the node instead of the actual cm:content property. (Opening the file with a text editor will show you the text of the second d:content property)

In fact, I guess that the ZIP has 2 entries with the same name and probably the last one is winning.

I attach a patch.


Comment by Derek Hulley [X] (Inactive) [ 03-Jul-18 ]

Thank you for reporting this and the patch.
Please follow the Contribution Guide, which will allow us to easily check and integrate the changes.

Comment by Indy Sandhu [ 03-Oct-18 ]

Igor Blanco just touching base to see if you intended to create the pull request for this issue or not?  Thank you.

Comment by Igor Blanco [ 09-Nov-18 ]

Hi Indy Sandhu,

I gave it a try but I've no prior experience with developing tests for Alfresco and after some hours trying to grasp how to develope a test for this I ran out of time.

So in short, no, I won't make a pull request, not at least shortly.

Comment by Derek Hulley [X] (Inactive) [ 09-Nov-18 ]

A PR for the fix itself would be a good start. We can review and write the test.

Generated at Mon Feb 18 07:02:48 GMT 2019 using JIRA 7.6.3#76005-sha1:8a4e38d34af948780dbf52044e7aafb13a7cae58.