Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

content fragment not fetched in publish

Avatar

Level 3

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.

4 Replies

Avatar

Level 3

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.

Avatar

Community Advisor

Hi @nivethaS 
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

Avatar

Administrator

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