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.

AEM Cloud Service - Content Fragments Usage in Pages Custom Asset Report | AEM Community Blog Seeding

Avatar

Administrator

BlogImage.jpg

AEM Cloud Service - Content Fragments Usage in Pages Custom Asset Report by Sreekanth Choudry Nalabotu

Abstract

Goal
Create a Custom Asset Report Experience AEM Content Fragments Report for finding the usage of Content Fragments in a Site (or a section of site with root path)

Solution
1) Create the report type node /apps/eaem-cs-asset-ref-report/asset-reports/cf-usage-report





2) Create report wizard /apps/eaem-cs-asset-ref-report/asset-reports/cf-usage-report-wizard




























3) Add a filter apps.experienceaem.assets.core.filters.AddCustomReports to add the custom CF report cf-usage-report to otb reports data source dam/gui/coral/components/commons/ui/shell/datasources/reportlistdatasource pulling from /libs/dam/content/reports/availablereports

Read Full Blog

AEM Cloud Service - Content Fragments Usage in Pages Custom Asset Report

Q&A

Please use this thread to ask the related questions.



Kautuk Sahni
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Reply

Avatar

Level 2

After adding filter AddCustomReports class, OOTB reports like Upload, Expiration, Modification, Publish, etc are breaking with below error:

Failed executing script /libs/cq/Page/Page.jsp: java.lang.NullPointerException
Cannot serve request to /mnt/overlay/dam/gui/content/reports/viewreport.html/var/dam/reports/db3f7b87-6473-4105-845f-e3a2e84d03c7/ggg.csv in BundledScriptServlet (/libs/granite/ui/components/coral/foundation/table/table.jsp)

Exception:
java.lang.NullPointerException
	at org.apache.sling.resourceresolver.impl.ResourceTypeUtil.relativizeResourceType(ResourceTypeUtil.java:56)
	at org.apache.sling.resourceresolver.impl.ResourceTypeUtil.areResourceTypesEqual(ResourceTypeUtil.java:45)
	at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.isResourceTypeInternal(ResourceResolverImpl.java:1102)
	at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.lambda$isResourceType$0(ResourceResolverImpl.java:1085)
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1737)
	at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.isResourceType(ResourceResolverImpl.java:1084)
	at org.apache.sling.api.resource.AbstractResource.isResourceType(AbstractResource.java:121)
	at org.apache.sling.api.resource.ResourceWrapper.isResourceType(ResourceWrapper.java:171)
	at org.apache.sling.engine.impl.filter.FilterPredicate.anyResourceTypeMatches(FilterPredicate.java:117)
	at org.apache.sling.engine.impl.filter.FilterPredicate.test(FilterPredicate.java:145)
	at org.apache.sling.engine.impl.filter.FilterHandle.select(FilterHandle.java:75)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:75)
	at com.adobe.granite.metrics.knownerrors.impl.ErrorLoggingComponentFilter.doFilter(ErrorLoggingComponentFilter.java:71)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.day.cq.wcm.core.impl.monitoring.PageComponentRequestFilter.doFilter(PageComponentRequestFilter.java:105)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:375)
	at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:190)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.day.cq.wcm.core.impl.page.PageLockFilter.doFilter(PageLockFilter.java:91)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:94)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.adobe.granite.csrf.impl.CSRFFilter.doFilter(CSRFFilter.java:217)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:283)
	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.dispatchRequest(SlingRequestProcessorImpl.java:323)
	at org.apache.sling.engine.impl.request.SlingRequestDispatcher.dispatch(SlingRequestDispatcher.java:211)
	at org.apache.sling.engine.impl.request.SlingRequestDispatcher.include(SlingRequestDispatcher.java:104)
	at com.day.cq.wcm.core.impl.WCMComponentFilter$ForwardRequestDispatcher.include(WCMComponentFilter.java:516)
	at