[MAGNOLIA-7476] Links to files with whitespaces stored directly in nodes are currently broken Created: 08/Mar/19  Updated: 02/Sep/19  Resolved: 02/Sep/19

Status: Closed
Project: Magnolia
Component/s: templating
Affects Version/s: 5.7.2, 6.0
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Mercedes Iruela Assignee: Adam Siska
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: XML File fileUpload.xml    
Issue Links:
causality
duplicate
duplicates MAGNOLIA-7531 Persona photos are missing in Preview... Closed
relation
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
Date of First Response:
Epic Link: Support
Story Points: 3

 Description   

when a file with whitespaces in the name is stored in a workspace, when it is retrieved from the template, it cannot be found because the URL is not generated propertly.

Steps to reproduce(demoauthor):
1. Go to Configurations app and add a new Dam upload filed (fileUpload.xml) to the tours app. (/modules/tours/apps/tours/subApps/detail/editor/form/tabs/tour/fields).
2. Go to Tours App and upload a file whitespaces in its name (for example to /magnolia-travels/Vietnam--Tradition-and-Today).
3. Add the following code to a tempate (for instance to html component in mtk)

<a href="${cmsfn.link(cmsfn.contentByPath('/magnolia-travels/Vietnam--Tradition-and-Today/photo', 'tours'))}">My file</a>

4. Go to pages app and use Basic template to create a page. Add and HTML component to this page.

Expected: link to the file you have uploaded.
Actual result: 404 error page.



 Comments   
Comment by Adam Siska [ 02/Sep/19 ]

fixed by MAGNOLIA-7531

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