[MAGNOLIA-2806] contentNodeIterator tag doesn't inherit content Created: 01/Jul/09 Updated: 23/Jan/13 Resolved: 07/Aug/09 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | taglibs |
| Affects Version/s: | 4.1, 4.0.2 |
| Fix Version/s: | 4.0.3, 4.1.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Thomas Duffey | Assignee: | Jan Haderka |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| 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 |
|
When you set inherit="true" on the content node iterator tag it does not inherit content from ancestor pages. |
| Comments |
| Comment by Thomas Duffey [ 02/Jul/09 ] |
|
Patch to ContentNodeIterator.getCollection() to use parent getFirstMatchingNode() method which handles inheriting from ancestor pages |
| Comment by Thomas Duffey [ 02/Jul/09 ] |
|
Patch to BaseContentTag.resolveNode(Content currentPage) to use supplied currentPage instead of the local content node to handle searching through ancestor pages |
| Comment by Thomas Duffey [ 02/Jul/09 ] |
|
Please review two attached patches. There are a lot of different conditional cases involved that I do not fully understand but this handled one test case I am working on doing something like: <cms:contentNodeIterator contentNodeCollectionName="adBox" inherit="true"> where I expect the inherit="true" attribute to look for the content in ancestor pages. Unfortunately, this breaks some test cases because apparently the use of BaseContentTag.getFirstMatchingNode() requires the [config] repository to be setup. I am trying to add this capability to the tests and will submit another patch for them if I can figure it out. |
| Comment by Thomas Duffey [ 02/Jul/09 ] |
|
Patch to make test case work along with the other patches in this issue |
| Comment by Thomas Duffey [ 28/Jul/09 ] |
|
Note that the ContentNodeIterator patch is solid – you definitely need to use getFirstMatchingNode() for inherit to work. The patch to BaseContentTag is most likely a hack that only worked for my current scenario. I believe a better solution may be found in |
| Comment by Jan Haderka [ 07/Aug/09 ] |
|
BaseContentTag patched by changes made for |