AEM 6.5 | Reusing content fragment models across project | Community
Skip to main content
Mukesh_Kumar_Co
Level 3
February 9, 2024

AEM 6.5 | Reusing content fragment models across project

  • February 9, 2024
  • 4 replies
  • 1761 views

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:

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

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

SureshDhulipudi
Community Advisor
Community Advisor
February 9, 2024

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?

Mukesh_Kumar_Co
Level 3
February 12, 2024

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.

Imran__Khan
Community Advisor
Community Advisor
February 11, 2024

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

Mukesh_Kumar_Co
Level 3
February 12, 2024

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.

mahi1729
Level 4
February 12, 2024

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 !

Mukesh_Kumar_Co
Level 3
February 12, 2024

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.

kautuk_sahni
Community Manager
Community Manager
February 16, 2024

@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
Mukesh_Kumar_Co
Level 3
February 16, 2024

Sure @kautuk_sahni. I'll share the solution with the community if find anything.