[
https://issues.apache.org/jira/browse/JCRVLT-544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17372097#comment-17372097
]
Carsten Ziegeler commented on JCRVLT-544:
-----------------------------------------
The change of JCRVLT-417 creates regressions; it is unclear to me whether that
change is trying to fix a theoretical or practical problem. If it is
theoretical we could think about reverting.
If that is not an option, then something similar to what repoinit tried to do
sounds reasonable to me: try without specifying a nodetype, if that fails,
provide a default one. (see
https://github.com/apache/sling-org-apache-sling-jcr-repoinit/blob/master/src/main/java/org/apache/sling/jcr/repoinit/impl/AclVisitor.java#L172)
.
If the solution used in repoinit is not working, I think we need to come up
with a reliable solution and use the same approach in both places. Maintaining
a list of known types might resolve the immediate issue. But its not
maintainable. Shouldn't it be possible to inspect the node type and see if a
default child node type is specified?
> Creation of folders based on parent nodetype instead of nt:folder causing
> regression
> ------------------------------------------------------------------------------------
>
> Key: JCRVLT-544
> URL: https://issues.apache.org/jira/browse/JCRVLT-544
> Project: Jackrabbit FileVault
> Issue Type: Bug
> Components: vlt
> Affects Versions: 3.4.4
> Reporter: Dominik Süß
> Priority: Major
>
> The change of JCRVLT-417 makes folder creation fall back to the nodetypes
> declared in the nodetype constraint of the primary type. This can cause
> regressions with existing packages.
> In the given case the nodetype cq:Component allows a child node definition
> with primaryType nt:base (which nt:folder derives from) - yet as nt:base has
> no childNodeDefinitions declared any substructures fail to install. The
> nodeType definition of cq:Component is correct as it "allows" anything
> deriving from nt:base, whereas only the derived nodeTypes open up further
> options like substructures.
> //cc [~kwin] introducing the behavioral change.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)