[
https://issues.apache.org/jira/browse/JCRVLT-880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18147792#comment-18147792
]
Christian Schneider commented on JCRVLT-880:
--------------------------------------------
[~kwin] PR #466 now has a regression test in which FileVault builds the package
itself:
{{FolderArtifactHandlerIT.testExportedSeparateDescendantWithoutPlaceholder}}
(https://github.com/apache/jackrabbit-filevault/pull/466).
The test creates {{sling:Folder}} nodes {{/testroot/a/b}}, plus
{{/testroot/a/b/content}} with a {{jcr:content}} child. It exports the content
node with {{packMgr.assemble()}}. The export uses an aggregation config in
which an unrestricted generic aggregate comes before the folder aggregate, the
same as the {{nodetype}} entry in {{defaultConfig-1.1-binaryless.xml}}. The
test asserts that the generated package has the problematic layout:
{{jcr_root/testroot/.content.xml}} inlines {{a}} and {{b}} without a
placeholder for {{content}}, and {{content}} has its own {{.content.xml}}.
Without the importer change, the REPLACE import deletes and recreates the
content node ({{A}} instead of {{U}}). With the change, the node is updated in
place, and independent and destination-only children survive.
> REPLACE import deletes and recreates separately serialized nodes omitted from
> an ancestor's .content.xml
> --------------------------------------------------------------------------------------------------------
>
> Key: JCRVLT-880
> URL: https://issues.apache.org/jira/browse/JCRVLT-880
> Project: Jackrabbit FileVault
> Issue Type: Bug
> Components: core
> Reporter: Christian Schneider
> Priority: Major
>
> When an ancestor {{.content.xml}} contains several inline hierarchy levels, a
> node that sits deeper than those levels may be serialized in its own
> {{.content.xml}} without a placeholder in the ancestor document. {{Importer}}
> processes the ancestor first and only gives it hints for its immediate child
> transactions. During REPLACE import, {{DocViewImporter}} therefore treats the
> deeper node as absent and removes it if the filter covers it. Its own
> {{.content.xml}} later recreates it. Descendants excluded by the filter are
> lost, and the node is recreated with a new identity.
> Expected: separately serialized descendants are treated as package content
> while the ancestor document is imported. Included nodes that are genuinely
> absent from the package are still removed.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)