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

stkDownloadList paragraph is empty when configured with single document and file extension.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 1.4.4
    • 1.4.3
    • paragraphs
    • None

      Steps to reproduce:

      • add download list paragraph to a page.
      • edit paragraph configuration
        • set document link = /openwfe/openwfe-technical-presentation
        • set file extension = pdf
      • save dialog

      Expected result - dialog list displays openwfe technical presentation (PDF, 174 KB)
      Actual result - dialog list is empty

      After some investigation it appears that the issue is in DownloadListModel::116.

      Changing

      if(node.getItemType().equals(ItemType.CONTENT)){
          expressions.add("jcr:path like '" + link + "/%'");
      }
      else if(Document.isDocument(node)){
          expressions.add("jcr:path like '" + link + "'");
      }
      

      to just (i.e. removing the if/else condition)

      expressions.add("jcr:path like '" + link + "/%'");
      

      seems to resolve the issue.

        Acceptance criteria

              ochytil Ondrej Chytil
              rgibson Rory Gibson
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: