There is a mismatch for saving an array of nested configurations through the Context Aware Configuration Editor and loading them with the ConfigurationBuilder.
The editor stores the array of nested configurations below /conf/contextaware-config-sample/sample/sling:configs/io.wcm.caconfig.sample.config.ConfigSampleNested/sub but the ConfigurationBuilder tries to load them from /conf/contextaware-config-sample/sample/sub/sling:configs/io.wcm.caconfig.sample.config.ConfigSampleNested/jcr:content/sub. Watch the additional jcr:content before the sub node.
I've used the wcm-io-caconfig sample-app to reproduce this issue. One Sling Model has been added to the sample-app core bundle to demonstrate the issue:
The code has been already been added in
The additional sample config + content has been added to the the package:
You can load, after installing the bundle & package on top of the sample-app project, the page http://localhost:4502/content/contextaware-config-sample/en/bug-page.html to reproduce the issue.
shows the wrong nested config location path.
Tested with the following versions installed in AEM 6.3 - SP2:
wcm.io Context-Aware Configuration Editor (io.wcm.caconfig.editor): 1.2.12
wcm.io Context-Aware Configuration Extensions for AEM (io.wcm.caconfig.extensions): 1.2.4
Apache Sling Context-Aware Configuration API (org.apache.sling.caconfig.api): 1.1.0
Apache Sling Context-Aware Configuration Implementation (org.apache.sling.caconfig.impl): 1.4.10
Apache Sling Context-Aware Configuration SPI (org.apache.sling.caconfig.spi): 1.3.2
Core Bundle + bug sample model:
Config + sample page package:
io.wcm.caconfig.extensions.persistence.impl.PagePersistenceStrategy has been enabled
The nested configuration should be stored & loaded in the same way (editor v.s. caconfig impl), according to the standards