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

extrasContactTeaser: wrong checking of the website property in template

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 1.3.1
    • paragraphs
    • None

    Description

      Is:
      if model.website?has_content
      <div>
      <h3>${i18n['contact.web.title']}</h3>
      <dl class="url">
      <dt>${i18n['contact.web']}</dt>
      <dd class="url"><a href="${model.website?html}">${model.contact.web?html}</a></dd>
      </dl>
      </div>
      /#if

      Should be:
      if model.contact.web?has_content
      <div>
      <h3>${i18n['contact.web.title']}</h3>
      <dl class="url">
      <dt>${i18n['contact.web']}</dt>
      <dd class="url"><a href="${model.website?html}">${model.contact.web?html}</a></dd>
      </dl>
      </div>
      /#if

      Or without a website defined in the contact, a freemarker error occurs:
      freemarker.core.InvalidReferenceException: Expression model.contact.web is undefined on line 104, column 63 in ...
      at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)

      Or the website method of the model should not return something if no web property defined.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              ochytil Ondrej Chytil
              cringele Christian Ringele
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: