Uploaded image for project: 'Magnolia Templating Essentials'
  1. Magnolia Templating Essentials
  2. MTE-147

Image generator generates wrong links for images stored directly in the content when viewing diff

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Neutral
    • None
    • None
    • None
    • None

    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.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              jsimak Jaroslav Simak
              DeveloperX
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Checklists

                  Bug DoR
                  Task DoD