[MAGNOLIA-7310] XML Exports open directly in browser instead of offering download Created: 08/May/18  Updated: 28/Jun/18  Resolved: 18/May/18

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 5.6.5
Fix Version/s: 5.6.6, 5.7

Type: Bug Priority: Major
Reporter: Christopher Zimmermann Assignee: Leah Staniorski
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File download-dialog-that-should-be-shown.png    
Issue Links:
causality
caused by MGNLUI-4326 Remove setting content-deposition man... Closed
dependency
duplicate
is duplicated by MAGNOLIA-7312 Export as xml opens the file in the b... Closed
is duplicated by MAGNOLIA-7336 Content-Disposition missing "attachme... Closed
is duplicated by MAGNOLIA-7314 XML Exporting not working Closed
relation
is related to MAGNOLIA-6536 Can't export JCR nodes on iPad Open
is related to MGNLCE-267 Create UI test for export action Open
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Release notes required:
Yes
Date of First Response:
Sprint: Basel 147
Story Points: 2

 Description   

When you click the Export button in a content app or from the JCR tools app, the XML opens directly in the browser, replacing the admincentral - instead of downloading the file.

We were previously using Vaadin's default behavior to create a content-deposition header with proper encoding, but it does not add the "attachment" key word so the browser tries to open it instead of downloading it. We must actually manually set this header instead of using Vaadin's code in order to add the "attachment" keyword to the header and force the browser to download the file.

 



 Comments   
Comment by Antti Hietala [ 09/May/18 ]

Possibly broken by a commit in MGNLUI-4326
https://git.magnolia-cms.com/projects/PLATFORM/repos/ui/pull-requests/514/commits

Content-Disposition header looks invalid after the change.

Example: Export contact Johann Sebastian Bach in the Contacts app and inspect the header.

Magnolia 5.6.5:
Content-Disposition: attachment;filename="contacts.jbach.xml"

Magnolia 5.6.6
Content-Disposition: filename="contacts.jbach.xml"; filename*=utf-8''contacts.jbach.xml

 

Generated at Mon Feb 12 04:22:39 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.