Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude com.adobe.aem.wcm.site.manager.config.SiteConfig from PagePersistenceStrategy #46

Open
koenkicken opened this issue Oct 25, 2024 · 3 comments

Comments

@koenkicken
Copy link

If io.wcm.caconfig.extensions.persistence.impl.PagePersistenceStrategy is enabled, then for OOTB Ca Config com.adobe.aem.wcm.site.manager.config.SiteConfig all the properties are saved to the underlying jcr:content node.

When developing for a new Site Theme and you want to set a new frontend pipeline for it, you need to set the themePackageName for it in the SiteConfig.

However, in the implementation (com.adobe.aem.wcm.frontend.manager.impl.SiteThemeUpdateFrontendCodeDeploymentEventListener#findSiteConfigsUsingPackage) it performs a query to look for this property on the SiteConfig itself, not on the jcr:content underneath.

Either the PagePersistenceStrategy osgi config should be more flexible, or the SiteConfig should be excluded and never saved as a cq:Page.

@stefanseifert
Copy link
Member

yes, this is sadly true. using a JCR query they bypass the persistence abstraction of context-aware configuration and assume the property is always stored in the same node. i would call this a bug in AEM, but it's unlikely to be fixed anytime soon i suppose.

so we have to think about a workaround on our side.

@koenkicken
Copy link
Author

@stefanseifert A possible workaround that I see is making the PagePersistenceStrategy osgi config more flexible.
Instead of making it a true/false value, this could be made a regex just like with the AbsoluteParentContextPathStrategy.

@stefanseifert
Copy link
Member

my proposal would be to add something like a "configNameDenyList" property to the OSGi configuration of the AEM page persistence strategy. it allows full string or regex to match against configuration names - and we would put "com.adobe.aem.wcm.site.manager.config.SiteConfig" as a default value into this list.

any configuration name matching one of these is handled the AEM page persistence strategy skips it's processing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants