adobe / aem-core-wcm-components

Standardized components to build websites with AEM.
https://docs.adobe.com/content/help/en/experience-manager-core-components/using/introduction.html
Apache License 2.0
723 stars 737 forks source link

core/wcm/components/experiencefragment/v2/experiencefragment components not found by com.adobe.cq.xf.impl.ExperienceFragmentReferenceProvider #2745

Open kwin opened 1 month ago

kwin commented 1 month ago

Bug Report

Current Behavior Experience fragments being referenced via https://github.com/adobe/aem-core-wcm-components/tree/main/content/src/content/jcr_root/apps/core/wcm/components/experiencefragment/v2/experiencefragment are supposed to be picked up by the com.adobe.cq.xf.impl.ExperienceFragmentsReferenceProvider

Expected behavior/code XF referenced in components of type core/wcm/components/experiencefragment/v2/experiencefragment are not found

Environment

Reason AEM 6.5.20 ships with bundle com.adobe.cq.cq-experience-fragments in version 1.2.98. The contained ExperienceFragmentsReferenceProvider only detects resource types derived from either

However v2 just inherits from core/wcm/components/experiencefragment (https://github.com/adobe/aem-core-wcm-components/blob/495bb52220baecb111be1b913f360905c9369800/content/src/content/jcr_root/apps/core/wcm/components/experiencefragment/v2/experiencefragment/.content.xml#L22)

The whole resource type inheritance of core/wcm/components/experiencefragment is quite different from other Core Components in it that v2 doesn't inherit from v1. And v1 doesn't inherit from cq/experience-fragments/editor/components/experiencefragment but rather from core/wcm/components/experiencefragment which is no component but merely a sling:Folder (https://github.com/adobe/aem-core-wcm-components/blob/495bb52220baecb111be1b913f360905c9369800/content/src/content/jcr_root/apps/core/wcm/components/experiencefragment/.content.xml#L3)

Additional context / Screenshots With AEMaaCS (containing bundle com.adobe.cq.cq-experience-fragments in version 1.3.84) it works, because there the contained ExperienceFragmentsReferenceProvider detects resource types derived from either

kwin commented 1 month ago

@vladbailescu As fix I would recommend to convert https://github.com/adobe/aem-core-wcm-components/blob/main/content/src/content/jcr_root/apps/core/wcm/components/experiencefragment/.content.xml to a proper component having cq/experience-fragments/editor/components/experiencefragment as resourceSuperType. WDYT?

kwin commented 1 month ago

I would open a PR but it seems that PRs from external contributors are no longer reviewed/merged in this project...