[MAGNOLIA-375] ifEmpty is not working properly Created: 06/May/05  Updated: 17/Mar/09  Resolved: 07/May/05

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: 2.1 Final

Type: Bug Priority: Minor
Reporter: Philipp Bärfuss Assignee: Fabrizio Giustina
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
Date of First Response:

 Description   

from an email:

i noticed some strange things with the core cms tags "ifNotEmpty" and "ifEmpty"...

i have a content element 'textTitle', which has content set. so it's not empty (at least to my understanding )

i have following test code:
nodeData 'textTitle' = <cms:out nodeDataName="textTitle" />

<cms:ifNotEmpty nodeDataName="textTitle" >
<br><cms:out nodeDataName="textTitle" /> --> from 'if not empty'
</cms:ifNotEmpty>

<cms:ifEmpty nodeDataName="textTitle" >
<br><cms:out nodeDataName="textTitle" /> --> from 'if empty'
</cms:ifEmpty>

the surprising result:
nodeData 'textTitle' = A line of Text
A line of Text --> from 'if empty'

i expect that i should get "A line of Text --> from 'if NOT empty'

why that? i am not using a collection or so. simply a "top level" content element.



 Comments   
Comment by Fabrizio Giustina [ 07/May/05 ]

fixed in svn

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