Closed davidjgonzalez closed 6 years ago
The context hub path will not be persisted any more starting with version 2 of the page component: https://github.com/Adobe-Marketing-Cloud/aem-core-wcm-components/blob/814fdf851678466c292b2e2505860a54c42b7006/content/src/content/jcr_root/apps/core/wcm/sandbox/components/page/v2/page/_cq_dialog/.content.xml#L530
I think the real issue is that, with static templates, templates can inherit from one base template. The base template can define a bunch of page properties and these can be added or removed at the non-base template level. How can this be achieved with template editor (editable template)? The problem is with editable template, looking at the pages using different templates, the sling:reourceType are the same: weretail/components/structure/page.
For this reason, all pages will share the same set of page properties despite they use different "editable templates". When editing a low level page, all page properties are persisted, including the ones should be only set once at root level.
@lbaoyu while i agree with this is an area for improvement, i do want to make it clear this is not the same issue as the issues i logged. It may be worth creating a separate issue for this.
The Core Page's dialog has (at least) for the ContextHub path [1] a "value" of "/etc/cloudsettings/default/contexthub".
The problem is if you inherit from Page component, you get this dialog config, and even though this value is not initially persisted to the [cq:Page]/jcr:content node, if you save the page properties (ex.update the Page Title) this "provided" value will be saved down to jcr:content.
This is problematic since contexthub should be set ONCE at the site root; this will pepper the content tree with this "overrides" which may or may not be the desired ContextHub (in my case it is not, and breaks all sorts of things).
[1] https://github.com/Adobe-Marketing-Cloud/aem-core-wcm-components/blob/31f8edee327d0a52c6def76cd39eb94692ab96e5/content/src/content/jcr_root/apps/core/wcm/components/page/v1/page/_cq_dialog/.content.xml#L490