Skip to main content
Level 3
Sep 11, 2024 12:03 PM UTC

content fragment not fetched in publish

Hi,

Content fragments are not fetching the data in the publishers, may i know the reason. I am fetching the articles from the content fragment for one of the component but in author it is working fine and in publisher it is displaying blank.

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

4 replies

HelpTechAuthor
Level 3
Sep 11, 2024 1:02 PM UTC

Hi Raja_Reddy,

I am not trying to fetch the data using the model class and service. And it is not exporting any json data i am just fetching the articles based on the query generated. In publisher when i try to hit the query the result is coming where as in the backend the

Map<String, String> map = predicatesMap(path);
            Query query = queryBuilder.createQuery(PredicateGroup.create(map), session);
            SearchResult searchResult = query.getResult();
searchResult.getHits() is giving me empty value.
Translate
arunpatidar
Community Advisor
Community Advisor
Sep 11, 2024 7:09 PM UTC

Hi @helptech 
Please check the read permissions for the subservice user, as it could be a permission issue. The user/session must have read and write access within the relevant tree to query the content under it.

Translate
Arun Patidar
kautuk_sahni
Level 9
Sep 13, 2024 9:41 AM UTC

@helptech Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Translate
Kautuk Sahni