[MAGNOLIA-5239] Handling of autogeneratedComponents doesn't depend on order in template definitions Created: 15/Aug/13 Updated: 27/Aug/13 Resolved: 26/Aug/13 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | rendering |
| Affects Version/s: | None |
| Fix Version/s: | 4.5.11, 5.0.4, 5.1 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Milan Divilek | Assignee: | Milan Divilek |
| 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
|
||||||||||||
| Description |
|
Steps to reproduce:
Similarly when you add new component into autogenerated components in template definitions - then if you place this component on first place then this component is generated during first visit of page, but when you add this component on different place then the component is not automatically generated. The problematic code is info.magnolia.rendering.generator.CopyGenerator.createNode(Node, Map<String, Object>) if(parentNode != null && parentNode.hasNode(name)) { log.debug("path {} was already found in repository. No need to create it.", parentNode.getPath() + "/" + name); break; } it checks if the component node exists if yes then it "break" for loop so no other components are processed. If we change break to continue then all component will be process, but this break the functionality of remove component from the page. Different question is if we want allow removing autogenerated components? |