Skip to main content
Mukesh_Kumar_Co
Level 3
Feb 9, 2024 2:22 PM UTC

AEM 6.5 | Reusing content fragment models across project

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.

9 replies

SureshDhulipudi
Community Advisor
Community Advisor
Feb 9, 2024 6:55 PM UTC

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?

Translate
Mukesh_Kumar_Co
Level 3
Feb 12, 2024 4:22 PM UTC

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.

Translate
Imran Khan
Community Advisor
Community Advisor
Feb 11, 2024 7:29 PM UTC

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

Translate
Mukesh_Kumar_Co
Level 3
Feb 12, 2024 4:24 PM UTC

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.

Translate
mahi1729
Level 4
Feb 12, 2024 5:29 AM UTC

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 !

Translate
Mukesh_Kumar_Co
Level 3
Feb 12, 2024 4:28 PM UTC

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.

Translate
kautuk_sahni
Level 9
Feb 16, 2024 10:13 AM UTC

@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.

Translate
Kautuk Sahni
Mukesh_Kumar_Co
Level 3
Feb 16, 2024 1:25 PM UTC

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

Translate