[MTE-147] Image generator generates wrong links for images stored directly in the content when viewing diff Created: 30/Aug/22  Updated: 30/Aug/22

Status: Open
Project: Magnolia Templating Essentials
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Jaroslav Simak Assignee: Unassigned
Resolution: Unresolved 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
Epic Link: DevX Bucket
Team: DeveloperX

 Description   

Steps to reproduce

 In Resources app:

  1. Edit Text and Image dialog in travel-demo module
    1. YAML: 
      !inherit:mtk2:components/textImage
      form:
        properties:
          constrainAspectRatio:
            $type: checkBoxField
          upload:
            label: Upload
            $type: uploadField
        layout:
          $type: tabbedLayout
          tabs:
            tabImage:
              fields:
                - name: constrainAspectRatio
                - name: upload 
  1. Edit Text and Image FTL in travel-demo module
    1. Add to the FTL: 
       [#if cmsfn.asJCRNode(content).hasProperty('jcr:data')]
          <img src="${imgfn.getImageVariationLinkFromBinary(content, '320')}" />
      [/#if]
  1. Go to Pagess app and create a new page under travel
  2. Edit the page, add Text and Image component, switch to Image tab and upload a new image
  3. Publish the page five times
  4. Compare two versions

Expected results

Image is rendered on the page

Actual results

No image is rendered on the page due to broken link

Workaround

None

Development notes

Must be solved in subclasses implementing Variation interface.

Caused by the fact that the node used for link creation is wrapped by VersionedNode / VersionedChildNode.


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