Following are details of the development environment.
AEM Version: 22.214.171.124-SSP1
Core CIF Version: 2.12.0
Core Component Version: 2.19.0
Magento GraphQL Version: 9.1.0-magento242ee
GraphQL Client version: 1.7.11
We have installed the above packages to enable the CIF commerce framework. The AEM is successfully integrated with Magento as well, the AEM Commerce section is enabled and can see Magento products there. We can use CIF core component to load products using CIF Product or Product Teaser core component as well.
What we have experienced is that after, the experience fragment's headless JSON response is broken. Those experience fragments include custom components and Our APIs are fetching experience fragment headless JSON output via “.model.json” URL.
Usually, the correct JSON output should be given with static content of the custom component which authored.
But, the Experience fragment (.model.json) URL output has the following JSON for the custom component.
You can see, that the JSON structure is empty and has set the type to a CIF core component "featuredcategorylist".
We tried with the different custom components, the result is the same.
But, if we add an AEM core component (or super resource Type to them), we can see the correct contents.
Troubleshooting was performed by deactivating the `AEM CIF Core Components - Core Bundlecom.adobe.commerce.cif.core-cif-components-core` bundle from the System Console to confirm this is caused by the CIF core bundle. Our guess was correct, we could see the correct headless output after disabling the CIF core bundle.
I tried with adding a sling model and setting up the ResourceType to the custom component, but it didn't work. Maybe my code wasn't correct.
Please let me know if you need any more details and really appreciate your support in finding out why CIF core bundle hijacked the Experience fragment headless JSON output.
I have attached the correct JSON response and the wrong JSON screenshots.