Uploaded image for project: 'Magnolia Standard Templating Kit (closed)'
  1. Magnolia Standard Templating Kit (closed)
  2. MGNLSTK-785

footerAbout template script can't render images without title

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 1.3.6
    • 1.3.5, 1.4.4
    • paragraphs
    • None
    • Yes

      In /templating-kit/paragraphs/footer/footerAbout.ftl, the following can't work for assets that don't have a title:

          [#assign imageAlt = image.title!image.@name]
      

      image in this case is an instance of info.magnolia.module.templatingkit.dam.Asset; a dms asset "always" has a title (since the title property is automatically filled in on creation in the tree), while an uploaded asset never does. The expression above thus falls back to @name, which can't be interpreted either, as there is no such property (image is an Asset, not a node).

      Trivial fix:

          [#assign imageAlt = image.title!image.name]
      

        Acceptance criteria

              cringele Christian Ringele
              gjoseph Magnolia International
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: