[MGNLSTK-768] stkDownloadList paragraph is empty when configured with single document and file extension. Created: 19/Apr/11  Updated: 16/May/11  Resolved: 21/Apr/11

Status: Closed
Project: Magnolia Standard Templating Kit (closed)
Component/s: paragraphs
Affects Version/s: 1.4.3
Fix Version/s: 1.4.4

Type: Bug Priority: Neutral
Reporter: Rory Gibson Assignee: Ondrej Chytil
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
caused by MGNLSTK-592 Add a paragraph feature template that... Closed
Template:
Acceptance criteria:
Empty
Date of First Response:

 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.



 Comments   
Comment by Zdenek Skodik [ 20/Apr/11 ]

Hi Rory,

thanks a lot for letting us know about this bug as well as for your investigation!
Would you mind if we move this ticket directly to where it belongs (MGNLSTK project) to have this fixed with next release?

Kind regards,
Zdenek

Comment by Rory Gibson [ 20/Apr/11 ]

Hi Zdenek
Please move the bug; we have a dependency on this being fixed, so for us, the sooner the better

Regards
Rory

Comment by Jan Haderka [ 16/May/11 ]

I would expect there was a reason for that condition, but since there are no tests explaining original behavior there is nothing much we can do. Linking the issues anyway to simplify tracking down the side effects (if any).

Generated at Mon Feb 12 07:30:14 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.