[MAGNOLIA-4533] wrong extends configuration fails loading of dialogs or templates Created: 17/Sep/12 Updated: 11/May/16 Resolved: 24/Sep/12 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 4.5.4 |
| Fix Version/s: | 4.5.5 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Philipp Bärfuss | Assignee: | Ondrej Chytil |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| 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
|
||||||||
| Description |
|
In case an absolute path is used in the extends field and if this node doesn't exist then a runtime exception is thrown. This exception makes the reload() method of the dialog or template manager fail and no item gets registered. To fix the issue we have to rewrite ExtendingContentWrapper.isExists(..) as follows: private boolean isExists(String extendedNode, Content parent) throws RepositoryException { if (extendedNode.startsWith("/")){ return getWrappedContent().getHierarchyManager().isExist(extendedNode); } else{ return parent.hasContent(extendedNode); } } |