[
https://issues.apache.org/jira/browse/SLING-11777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Niek Raaijmakers updated SLING-11777:
-------------------------------------
Description:
To solve a problem with default nodetype being nt:folder while it should be
sling:Folder for sling initial content parsed by the cpconverter, we
implemented a workaround back in the day using create path statements for each
folder. The subsequent package installation with filters containing
mode=update, would overwrite the primaryType where it was defined in the source
package. This worked in filevault 3.4.0.
However with filevault 3.6.0+ the primaryType is no longer updated with the
filter update, so we need a new approach / workaround.
The new approach is to provide .content.xml files for all the parents (up to
/jcr:root/apps/parent, but not jcr:root/apps) in the package. Then we use the
replace filter instead ( should correspond with the original sling initial
content behaviour, see [source
code|https://github.com/apache/sling-org-apache-sling-jcr-contentloader/blob/master/src/main/java/org/apache/sling/jcr/contentloader/internal/JcrXmlImporter.java#L67])
We also need to update the merge to merge_properties filter, as merge is now
deprecated.
was:
To solve a problem with default nodetype being nt:folder while it should be
sling:Folder for sling initial content, we implemented a workaround back in the
day using create path statements for each folder. The subsequent package
installation with filters containing mode=update, would overwrite the
primaryType where it was defined in the source package. This worked in
filevault 3.4.0.
However with filevault 3.6.0+ the primaryType is no longer updated with the
filter update, so we need a new approach / workaround.
The new approach is to provide .content.xml files for all the parents (up to
/jcr:root/apps/parent, but not jcr:root/apps) in the package. Then we use the
replace filter instead ( should correspond with the original sling initial
content behaviour, see [source
code|https://github.com/apache/sling-org-apache-sling-jcr-contentloader/blob/master/src/main/java/org/apache/sling/jcr/contentloader/internal/JcrXmlImporter.java#L67])
We also need to update the merge to merge_properties filter, as merge is now
deprecated.
> CPConverter - Sling Initial Content - default nodetype - filevault upgrade
> --------------------------------------------------------------------------
>
> Key: SLING-11777
> URL: https://issues.apache.org/jira/browse/SLING-11777
> Project: Sling
> Issue Type: Improvement
> Components: Content-Package to Feature Model Converter
> Reporter: Niek Raaijmakers
> Assignee: Niek Raaijmakers
> Priority: Blocker
> Fix For: Content-Package to Feature Model Converter 1.3.2
>
>
> To solve a problem with default nodetype being nt:folder while it should be
> sling:Folder for sling initial content parsed by the cpconverter, we
> implemented a workaround back in the day using create path statements for
> each folder. The subsequent package installation with filters containing
> mode=update, would overwrite the primaryType where it was defined in the
> source package. This worked in filevault 3.4.0.
>
> However with filevault 3.6.0+ the primaryType is no longer updated with the
> filter update, so we need a new approach / workaround.
>
> The new approach is to provide .content.xml files for all the parents (up to
> /jcr:root/apps/parent, but not jcr:root/apps) in the package. Then we use the
> replace filter instead ( should correspond with the original sling initial
> content behaviour, see [source
> code|https://github.com/apache/sling-org-apache-sling-jcr-contentloader/blob/master/src/main/java/org/apache/sling/jcr/contentloader/internal/JcrXmlImporter.java#L67])
> We also need to update the merge to merge_properties filter, as merge is now
> deprecated.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)