[ 
https://issues.apache.org/jira/browse/SLING-12197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17795349#comment-17795349
 ] 

Stefan Seifert commented on SLING-12197:
----------------------------------------

scenario to reproduce the problem:
* the bundle 
https://repo1.maven.org/maven2/io/wcm/io.wcm.handler.link/1.10.2/io.wcm.handler.link-1.10.2.jar
 contains Sling-Initial-Content, and a folder 
{{/apps/wcm-io/handler/link/components/global/include}} with three sub nodes 
with {{nt:unstructured}} node type, represented as three separate JSON files
* the sample project https://github.com/wcm-io/aem-guides-wknd-wcmio builds an 
"all" content package including (amongst others) this bundle
* fit the "all" content package is transformed using cpconverter 1.3.4, the 
resulting content package is 
[^io.wcm.handler.link-apps-1.10.2-cp2fm-converted.zip]
* if the resulting content package is deployed, the folder 
{{/apps/wcm-io/handler/link/components/global/include}} remains empty because 
the three nodes could not be extracted, error message:

{noformat}
11.12.2023 13:57:58.295 *WARN* [qtp22494311-117] 
org.apache.jackrabbit.vault.fs.impl.io.DocViewImporter Error during processing 
of /apps/wcm-io/handler/link/components/global/include/redirectStatus: 
javax.jcr.nodetype.ConstraintViolationException: No matching node definition 
found for redirectStatus, skip node due to import mode UPDATE
11.12.2023 13:57:58.296 *WARN* [qtp22494311-117] 
org.apache.jackrabbit.vault.fs.impl.io.DocViewImporter Error during processing 
of /apps/wcm-io/handler/link/components/global/include/linkRefTab: 
javax.jcr.nodetype.ConstraintViolationException: No matching node definition 
found for linkRefTab, skip node due to import mode UPDATE
11.12.2023 13:57:58.296 *WARN* [qtp22494311-117] 
org.apache.jackrabbit.vault.fs.impl.io.DocViewImporter Error during processing 
of /apps/wcm-io/handler/link/components/global/include/linkRefNoTitleTab: 
javax.jcr.nodetype.ConstraintViolationException: No matching node definition 
found for linkRefNoTitleTab, skip node due to import mode UPDATE
{noformat}

> cpconverter: Sling-Initial-Content directories created as nt:folder instead 
> of sling:Folder
> -------------------------------------------------------------------------------------------
>
>                 Key: SLING-12197
>                 URL: https://issues.apache.org/jira/browse/SLING-12197
>             Project: Sling
>          Issue Type: Bug
>          Components: Content-Package to Feature Model Converter
>    Affects Versions: Content-Package to Feature Model Converter 1.3.4
>            Reporter: Stefan Seifert
>            Priority: Major
>             Fix For: Content-Package to Feature Model Converter 1.3.6
>
>
> the cpconverter extracts Sling-Initial-Content from OSGi bundles and creates 
> FileVault packages with the transformed content.
> this works well, but there is one difference when the resulting content 
> package is installed compared when uploading the OSGi bundle with the 
> Sling-Initial-Content directly:
> * the JCR Content Loader by defaults creates a {{sling:Folder}} node type for 
> each directory found in the Sling-Initial-Content (see also 
> [docs|https://sling.apache.org/documentation/bundles/content-loading-jcr-contentloader.html#initial-content-loading-1])
> * the cpconverter process creates no {{.content.xml}} file for the folders, 
> but only for the actual JSON files found in the process. as a result, the 
> folders are created as {{nt:folder}} when uploading the transformed package
> * this difference becomes relevant, when a JSON file in Sling-Initial-Content 
> defines a primary type of {{nt:unstructured}} - it is not allowed to created 
> such a node directly below a {{nt:folder}} node - but it is allowed to do so 
> below a {{sling:Folder}} node



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to