Multiple jcr:content in the caconfig under /conf
Description
Attachments
- 13 Dec 2021, 11:21 PM
Activity
Stefan Seifert December 20, 2021 at 9:48 AM
Stefan Seifert December 17, 2021 at 8:31 AM
we are currently preparing a bigger caconfig impl 1.6.x on the master branch with some more features (but also dependency on updated spi bundle).
but to get this fix out of the door soon i’ve created a release branch and triggered the release process for a 1.5.2 bugfix release, if all goes well release is available early next week.

Kapil Gahlawat December 16, 2021 at 11:57 PM
@Stefan: Just tested with 1.5.1-SNAPSHOT in my local machine. Issue has been fixed now. Thanks for taking care of it.
Do you have any idea when can we expect the new version in maven repo?
Stefan Seifert December 16, 2021 at 5:00 PM
@Kapil Gahlawat i fixed the root cause - the issue is actually in sling caconfig impl, not in the wcm.io caconfig extension or editor: https://issues.apache.org/jira/browse/SLING-11019
it is fixed in in org.apache.sling.caconfig.impl 1.5.1-SNAPSHOT - can you deploy this snapshot to a local machine and check if it solves the problem for you as well?
Stefan Seifert December 15, 2021 at 11:21 AM
thanks for reporting, i was able to reproduce the issue with our sample application (updated it a bit to make error visible):
entered data does not show up at http://localhost:4502/content/contextaware-config-sample/en.html?wcmmode=disabled
in the repository, the additional "jcr:content" node is the problem
Details
Details
Assignee
Reporter

Verisons being used:
Context-Aware Configuration Editor 1.8.6
Context-Aware Configuration Extensions 1.8.8
Description:
Additional node jcr:content is being created by the configuration editor. Though, sample included in the https://wcm-io.atlassian.net/browse/WCON-63#icft=WCON-63 works fine now but issue can be reproduced using the sample code provided by wcm-io: https://github.com/wcm-io/wcm-io-caconfig/tree/develop/sample-app
When we try to configure using "Sample Configuration Nested" from the sample, additional jcr:content is created: /conf/contextaware-config-sample/sample/sling:configs/io.wcm.caconfig.sample.config.ConfigSampleNested/jcr:content/sub2List/item1/jcr:content/sub
Rest of the configuration works absolutely fine. Only at this particular place this additional jcr:content node is being created. It can be reproduced using the example provided in WCON-63. Just replace MenuLinkConfig[] links() with MenuLinkConfig links() in https://wcm-io.atlassian.net/browse/WCON-63#icft=WCON-63 example and it will create an additional jcr:content node : /conf/contextaware-config-sample/sample/sling:configs/io.wcm.caconfig.sample.config..FooterConfig/jcr:content/menu/item1/jcr:content/links
Impact of issue:
Though, configuration editor is able to pick this configuration under jcr:content, when we try to get this configuration in the form of json (For headless CMS purpose), configuration under jcr:content is not being picked up. We are using jackson @JsonGetter annotation to convert Context aware configuration class to json. JsonGetter is expecting sub node but it encounters jcr:content.
Please find attached screenshot of the configuration containing additional jcr:content node