[MGNLSTK-251] Link Resolving of files located in DMS does not work -> link returns with ".html" instead of the file extension Created: 15/Jan/09  Updated: 23/Jan/13  Resolved: 16/Jan/09

Status: Closed
Project: Magnolia Standard Templating Kit (closed)
Component/s: None
Affects Version/s: 1.0
Fix Version/s: 1.0

Type: Bug Priority: Major
Reporter: Christian Ringele Assignee: Jan Haderka
Resolution: Fixed Votes: 0
Labels: mme_sprint5
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

When resolving a link from a file located within the dms repository, the link ends with .html and not with the file extension.

For example if these methods are used:
LinkUtil.createLink(repositoryId, uuid, true);
LinkUtil.createAbsoluteLink(node, true);

In the STKUtil class there is at the moment a hack class, that the paragraph template can use a method (no hack in the template).
The hack method in STKUtil is:
//TODO: This is a hack because of a link resolving problem within DMS. The JIRA task about this bug is: http://jira.magnolia-cms.com/browse/MGNLSTK-251
public static String createImageLink(Document document)

{ return MgnlContext.getContextPath()+"/dms"+document.getLink(); }

 Comments   
Comment by Jan Haderka [ 16/Jan/09 ]

Done as of r21389.

Generated at Mon Feb 12 07:25:12 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.