aem-core-wcm-components icon indicating copy to clipboard operation
aem-core-wcm-components copied to clipboard

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

Open kwin opened this issue 9 months ago • 2 comments

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

  • AEM version and patch level: 6.5.20
  • Core Components version: 2.24.6

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

  • cq/experience-fragments/editor/components/experiencefragment or
  • core/wcm/components/experiencefragment/v1/experiencefragment

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

  • cq/experience-fragments/editor/components/experiencefragment,
  • core/wcm/components/experiencefragment/v1/experiencefragment or
  • core/wcm/components/experiencefragment

kwin avatar May 06 '24 17:05 kwin

@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 avatar May 06 '24 17:05 kwin

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

kwin avatar May 06 '24 17:05 kwin