-
Bug
-
Resolution: Fixed
-
Neutral
-
None
-
None
-
-
Empty show more show less
Steps to reproduce:
- Lets have this structure of autogeneratedComponents
- autoGeneration -- conent --- first component --- second component --- third component
- Then visit the page where autogenerated components are located and remove the first component.
- Previously removed component is automatically created and is ordered as last.
- Remove second component then the component is not automatically created again.
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?
- is related to
-
MAGNOLIA-5148 Auto generated components are not always in same order
- Closed
-
DOCU-464 Autogenerated components - Description how CopyGenerator works
- Closed