[MAGNOLIA-302] cms:ifEmpty tag is not working properly Created: 05/Mar/05 Updated: 17/Apr/05 Resolved: 17/Apr/05 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | taglibs |
| Affects Version/s: | 2.01 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Andreas Weder | Assignee: | Fabrizio Giustina |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
2.02 branch, java 1.4.2_06, any browser |
||
| 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 |
|
It looks to me like the ifEmpty tag is not working properly in all situations. I have an already existing page to which I added the following tags: <cms:contentNodeIterator contentNodeCollectionName="centralLeftLinks"> The intention of this is to only offer a newBar if no "linksParagraph" has already been instantiated. Using this version with the cms:ifEmpty tag works fine for a newly created page. If I have an existing page however, which didn't contain any "centralLeftLinks" contentNode so far, the newBar never shows up. If I somehow manage to make the page contain the contentNode for at least once (i.e. with the code snippet below), the ifEmpty tag then works the way it's supposed to work. If I replace the above cms:ifEmpty tag with the following inline java code, however, I get what I need: <% catch (Exception e) { // Do nothing, if not found. } if ((collection == null) || I've deleted the "work" directory of tomcat, and I've also tried to patch the ifEmpty code to work exactly like my inline code, but that doesn't help. |
| Comments |
| Comment by Fabrizio Giustina [ 17/Apr/05 ] |
|
fixed in svn |