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

Stacktrace on missing image for MTK/Image component

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Neutral
    • None
    • 1.1.1
    • None
    • None

    Description

      In my project, I am using mtk:components/image component.

      I have selected an image and it works fine.

      Now the image is deleted and the component throws:
      FreeMarker template error (HTML_DEBUG mode; use RETHROW in production!)

      The following has evaluated to null or missing:
      ==> damfn.getRendition(content.image, "original") [in template "mtk/templates/components/image.ftl" at line 14, column 26]

      It looks like the code at mtk/templates/components/image.ftl:line 14 is not handling null-values very well, because getRendition can return null when the image is not there:
      assign rendition = damfn.getRendition(content.image, "original")

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              mkooijman Martijn Kooijman
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD