Closed pat-lego closed 2 years ago
This is intentional; the assumption is that a given component conversion rule takes into consideration the entire tree.
If the rule will only apply to an intermediate node, and the children need to be preserved, add the cq:copyChildren
property to the replacement definition. (Reference)
@bstopp awesome thanks for this 👍
Expected Behaviour
When running a component conversion on a node that has subnodes the subnodes should be left in the repository and not deleted.
Actual Behaviour
When running a component conversion on a node with subnodes the conversion occurs correctly but all nodes below the converted component are removed.
Steps to Reproduce
Create a component conversion rule that converts a component that has subnodes below it. For instance if you want to convert a container to a new container component make sure that this component has subnodes below it in the CRX/DE.
Run the component conversion tool and then look at the converted node and see that the resource type has been changed but all subnodes below this have been removed.
Platform and Version
AEM 6.5.12 Java 8 aem-modernize-tools-2.1.0
Sample Code that illustrates the problem
Logs taken while reproducing problem