[MGNLDATA-32] Invalid link to file in dialog Created: 30/Jun/08  Updated: 02/Jul/14  Resolved: 28/Jul/08

Status: Closed
Project: Magnolia Data Module (closed)
Component/s: None
Affects Version/s: 1.1
Fix Version/s: 1.2.1

Type: Bug Priority: Minor
Reporter: Wolfgang Habicht Assignee: Jan Haderka
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File DialogFile.java.patch    
Issue Links:
dependency
depends upon MAGNOLIA-2288 Incorrect binary file preview path. Closed
duplicate
is duplicated by MGNLDATA-36 Link to file in file control is inacc... Closed
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   
  • configure the data-module to have an element containing "data" (controlType file, type Binary)
  • create a new such data node and store a non-picture file (for example a video)
  • save the changes
  • open the node once again; now there is a symbol with the video and a link to the file
    ==> the url in that like is invalid; /data is missing at the beginning


 Comments   
Comment by Philipp Bracher [ 01/Jul/08 ]

The data module provides an extra control for binary data (files). I don't remember its exact name, but please check /modules/data/controls.

Comment by Wolfgang Habicht [ 01/Jul/08 ]

If I use the controlType 'dataFile' I get the same invalid url

Comment by Philippe Marschall [ 27/Jul/08 ]

Actually the bug is in the module magnolia-gui.

The bug report is a bit unclear. The bug is only visible for something for which a preview image can not be shown like a PDF. This is because the class DialogFile does not consistently use the mehtod #getFileURI which DataFileControl overrides. There is the additional issue that DialogFile does not set the file extension for the download URI which makes Magnolia return the wrong content type. For something like a PDF this results in the binary data of the PDF being displayed.

Steps to Reproduce

  • configure the data-module to have an element containing "data" (controlType dataFile, type Binary)
  • create a new such data node and store a PDF
  • save the changes
  • open the node once again
  • click on the link with the PDF

Expected Behavior

  • a PDF download starts with the correct content type
  • a PDF reader like Adobe Reader is started to display the download

Observed Behavior

  • a 404 response form the server

Fix attached

DialogFile should be reviewed for more such bugs.

Comment by Jan Haderka [ 28/Jul/08 ]

Thanks for patch. Applied as r17067.

Generated at Mon Feb 12 05:10:41 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.