Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

AEM 6.5 | Reusing content fragment models across project

Avatar

Level 4

We created one reusable Content Fragment Model (CFM) in a common project(A) and tried to reuse it in another project(B). While trying to read the Content Fragment Model field of A using a persistent query created inside B, it shows an error message like below:

Mukesh_Kumar_Co_0-1707488166544.png

Wondering if anyone faced the similar problem and was able to fix it?

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

9 Replies

Avatar

Community Advisor

Did you check, if the issue related with Access / Permission issue?

Service User 

Check Permission

or

Check the Query and CFM path

Is this CFM working fine in Project A?

Avatar

Level 4

Yes, the query is working fine if I create the persistent query in A and try to read the CFM fields created in A. The issue is only when we try to read CFM created in B from a persistent query created in A.

Avatar

Level 4

Hi @SureshDhulipudi, The publisher instance is free from authentication. From Project A, I can read all the fields of CFM created in Project A. The issue is with access to CFM B from a persistent query created in A.

Avatar

Community Advisor

Did you try to access or query from project A. If it works, for sure it is permission issue on fragment model and /content/cq:graphql

Avatar

Level 4

Yes, the query is working fine if I create the persistent query in A and try to read the CFM fields created in A. The issue is only when we try to read CFM created in B from a persistent query created in A.

Avatar

Level 5

Do u just mean two different sites like /content/sitea and /content/siteb, when you referred them as projects or do u actually mean two different frontend apps ? Also this could be an issue depending on the level of ur conf folders i.e. if these 2 projects use /conf/project-1 and /conf/project-2 or /conf/parent/project1 and /conf/parent/project2, then there is an issue before aem 6.5 sp17 that can even break the overall graphql functionality. More details are appreciated. Thanks !

Avatar

Level 4

By two projects I mean conf/A and conf/B. When I create a persistent query in A, I can't read the fields of CFM created in B.

Avatar

Administrator

@Mukesh_Kumar_Co Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni