[MAGNOLIA-1819] cms:ifEmpty does not behave as expected for contentNodeCollectionName Created: 07/Nov/07  Updated: 23/Jan/13  Resolved: 07/Nov/07

Status: Closed
Project: Magnolia
Component/s: taglibs
Affects Version/s: 3.1 M3
Fix Version/s: 3.5 RC1

Type: Bug Priority: Major
Reporter: Vivian Steller Assignee: Vivian Steller
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

<cms:ifEmpty contentNodeCollectionName="someName" /> does not behave as expected, once there is something in this contentNodeCollectionName it still says that its empty (always returns true).
Note that this tag is used at the top level and is not contained within container loop.



 Comments   
Comment by Vivian Steller [ 07/Nov/07 ]

This fix could possibly break some cms:out tags as both use BaseContentTag to resolve the firstMatchingNode;
anyway with this fix both tags work as one would expected (before cms:out expected node to be null if contentNodeName was empty but contentNodeCollectionName was provided; now we return the contentNodeCollection instead of null).

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