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

Details

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

    Description

      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.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved: