content fragment not fetched in publish | Community
Skip to main content
Level 3
September 11, 2024

content fragment not fetched in publish

  • September 11, 2024
  • 2 replies
  • 866 views

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.

2 replies

HelpTechAuthor
Level 3
September 11, 2024

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.
arunpatidar
Community Advisor
Community Advisor
September 11, 2024

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.

Arun Patidar
kautuk_sahni
Community Manager
Community Manager
September 13, 2024

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

Kautuk Sahni