[
https://issues.apache.org/jira/browse/JCRVLT-544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17372055#comment-17372055
]
Konrad Windszus commented on JCRVLT-544:
----------------------------------------
The default node type is orthogonal to allowed child nodes. It is a separately
maintained in the CND file (and inside the repository). In the CND default node
types are given as
{code}
= ns:defaultType
{code}
Currently the CND of {{cq:Component}} looks like this
{code}
[cq:Component] > mix:title, nt:folder, sling:ResourceSuperType
- dialogPath (string)
- cq:noDecoration (boolean)
- allowedChildren (string) multiple
- * (undefined)
- cq:isContainer (boolean)
- allowedParents (string) multiple
- * (undefined) multiple
- cq:cellName (string)
- componentGroup (string)
+ dialog (nt:base) = nt:unstructured
+ design_dialog (nt:base) = nt:unstructured
+ cq:htmlTag (nt:base) = nt:unstructured
+ * (nt:base) = nt:base multiple version
+ cq:infoProviders (nt:base) = nt:unstructured
+ cq:editConfig (cq:EditConfig) = cq:EditConfig
+ icon.png (nt:file)
+ cq:childEditConfig (cq:EditConfig) = cq:EditConfig
+ thumbnail.png (nt:file)
+ virtual (nt:base) = sling:Folder
...
{code}
while it should IMHO rather look like this
{code}
...
+ * (nt:base) = nt:folder multiple version
...
{code}
I still think that relying on the default node type is in general much better
than always falling back to {{nt:folder}}. But obviously this may cause
regressions for node types not defining a proper default type like
{{cq:Component}}. I would still like to see a real world example package
relying on nt:folder's below cq:Component. [~dsuess] Can you share such a
package?
> 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)