[RESPDAM-64] FTL Helper Ignores Context in URLs Created: 28/Mar/22  Updated: 01/Apr/22  Resolved: 01/Apr/22

Status: Resolved
Project: DAM Focal
Component/s: None
Affects Version/s: 2.3
Fix Version/s: 2.3.1

Type: Bug Priority: Neutral
Reporter: Chris Jennings Assignee: Raphael Falvo
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

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:

 Description   

When generating image URLs with damfn, the application context is included in the output. The RESPDAM helper functions however, do not include it.

This is slightly annoying as it inconsistent.



 Comments   
Comment by Raphael Falvo [ 30/Mar/22 ]

Hi chris.jennings, could you provide more details on that one, I'm not sure to understand what you mean when referring to "RESPDAM helper functions".

If you could provide a snippet of both feature you are comparing here, that would be nice  

Comment by Chris Jennings [ 01/Apr/22 ]

The module provides FTL helper libraries: https://docs.magnolia-cms.com/dam-focal/index.html#_templating_functions

When I use the damfn library like so:

[#assign resizedRendition = damfn.getRendition(content.image, "240")!]
[#assign resizedRenditionImageLink = resizedRendition.link /]

I get a URL that includes the application context. eg.
http://localhost:8080/*magnoliaAuthor*/.imaging/mte/theme/240/dam/magnolia/offices/hq_02.jpeg/jcr:content/hq_02.jpeg

However, when I use the damfpfn library like so

[#assign image = damfn.getAsset(content.image) /]
[#assign croppedImageLink = damfpfn.getVariationUrl(image, 120, 360) /]

I get a URL that does not include the application context.

I think it would be useful to make the libraries consistent.

Comment by Raphael Falvo [ 01/Apr/22 ]

Changes will be introduced in version 2.3.1.

2 damfafn.getVariationUrl and 1 damfafn.getVariationUrl functions marked as deprecated

2 damfafn.getVariationLink and 1 damfafn.getVariationLink created and returning path with context path

 

Comment by Chris Jennings [ 01/Apr/22 ]

Changing the damfafn function library sounds good but can we also include the damfpfn that I originally flagged please? Focal areas (where damfafn applies) is deprecated.

Generated at Mon Feb 12 00:42:11 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.