You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resource type => {appId}/components/page
resource super type => core/wcm/components/page/v3/page (this is fine, allows delegation)
but for experience fragments:
resource type => {appId}/components/xfpage
resource super type => cq/experience-fragments/components/xfpage (this is not correct, the super type is not core component page so that Sling Models injection will fail)
Wrapping up, I am expecting that AEM project structure generated from archetype will allow customisation of any core components without side effects like I just described related to XFs.
Probably 'customheaderlibs.html' and 'customfooterlibs.html' just have to load htmlPageItems on their own (not reusing core components page Java logic to fix the problem.
Actual Behaviour
AEM project files generated from the archetype setup do not allow following the Core Components documentation regarding the extendability of the Core Page Component without fixing the XF problem on their own.
Platform and Version
Recent archetype files (51)
Logs taken while reproducing problem
org.apache.sling.scripting.sightly.SightlyException: Identifier com.acme.aem.core.components.page.PageModel cannot be correctly instantiated by the Use API
at org.apache.sling.scripting.sightly.impl.engine.extension.use.UseRuntimeExtension.call(UseRuntimeExtension.java:76) [org.apache.sling.scripting.sightly:1.4.22.140]
at org.apache.sling.scripting.sightly.impl.engine.runtime.RenderContextImpl.call(RenderContextImpl.java:72) [org.apache.sling.scripting.sightly:1.4.22.140]
at org.apache.sling.scripting.sightly.apps.acme.components.xfpage.customheaderlibs__002e__html.render(customheaderlibs__002e__html.java:72)
at org.apache.sling.scripting.sightly.render.RenderUnit.render(RenderUnit.java:53) [org.apache.sling.scripting.sightly.runtime:1.2.6.140]
at org.apache.sling.scripting.sightly.impl.engine.SightlyCompiledScript.eval(SightlyCompiledScript.java:61) [org.apache.sling.scripting.sightly:1.4.22.140]
at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:393) [org.apache.sling.scripting.core:2.4.8]
The text was updated successfully, but these errors were encountered:
krystian-panek-vmltech
changed the title
Custom header/footer script fails on XF when page component is customized
Script 'xfpage/customheaderlibs.html' fails when core page component is customised
Dec 4, 2024
Expected Behaviour
When doing page component customization based on:
https://experienceleague.adobe.com/en/docs/experience-manager-core-components/using/developing/customizing#customizing-the-logic-of-a-core-component
like this:
it has no chance to work on XFs which are assuming that
xfpage
is some kind ofpage
, see:aem-project-archetype/src/main/archetype/ui.apps/src/main/content/jcr_root/apps/__appId__/components/xfpage/customheaderlibs.html
Line 56 in 8e50a6d
because for regular pages we have:
resource type => {appId}/components/page
resource super type => core/wcm/components/page/v3/page (this is fine, allows delegation)
but for experience fragments:
resource type => {appId}/components/xfpage
resource super type => cq/experience-fragments/components/xfpage (this is not correct, the super type is not core component page so that Sling Models injection will fail)
Wrapping up, I am expecting that AEM project structure generated from archetype will allow customisation of any core components without side effects like I just described related to XFs.
Probably 'customheaderlibs.html' and 'customfooterlibs.html' just have to load htmlPageItems on their own (not reusing core components page Java logic to fix the problem.
Actual Behaviour
AEM project files generated from the archetype setup do not allow following the Core Components documentation regarding the extendability of the Core Page Component without fixing the XF problem on their own.
Platform and Version
Recent archetype files (51)
Logs taken while reproducing problem
The text was updated successfully, but these errors were encountered: