I'm trying to add embed component by html by using this tag:
<sly data-sly-resource="${'embed' @resourceType='/apps/site/components/embed'}" />
But when I try to edit the dialog I get this error:
com.adobe.cq.wcm.core.components.internal.servlets.embed.EmbeddableOptionsDataSourceServlet
java.lang.NullPointerException at com.day.cq.wcm.core.impl.policies.ContentPolicyManagerImpl.hasStructureTemplate(ContentPolicyManagerImpl.java:223) at com.day.cq.wcm.core.impl.policies.ContentPolicyManagerImpl.getPolicyMapping(ContentPolicyManagerImpl.java:241) at com.day.cq.wcm.core.impl.policies.ContentPolicyManagerImpl.getPolicy(ContentPolicyManagerImpl.java:104) at com.adobe.cq.wcm.core.components.internal.servlets.embed.EmbeddableOptionsDataSourceServlet.getEmbeddableOptions(EmbeddableOptionsDataSourceServlet.java:73) at com.adobe.cq.wcm.core.components.internal.servlets.embed.EmbeddableOptionsDataSourceServlet.doGet(EmbeddableOptionsDataSourceServlet.java:62) at org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:266) at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:574) at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:88) at com.day.cq.wcm.core.impl.WCMDeveloperModeFilter.doFilter(WCMDeveloperModeFilter.java:119) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:156) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:165) 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 com.adobe.granite.ui.components.impl.SlingIncludeObjectFactory.get(SlingIncludeObjectFactory.java:118) at com.adobe.granite.ui.components.impl.BaseComponentHelper.asDataSource(BaseComponentHelper.java:486) at com.adobe.granite.ui.components.impl.BaseComponentHelper.getItemDataSource(BaseComponentHelper.java:431) at com.adobe.granite.ui.components.impl.BaseComponentHelper.getItemDataSource(BaseComponentHelper.java:396) at com.adobe.granite.ui.components.ComponentHelper.getItemDataSource(ComponentHelper.java:363) at org.apache.jsp.libs.granite.ui.components.coral.foundation.form.fieldset.fieldset_jsp._jspService(fieldset_jsp.java:163) at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
If I add the same component manually it works perfectly.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @danielchido ,
The issue could be with missing node for embed component in the content , that you need to create your component for embed using cq:template node under main component you are trying to add.
Tried embedding with cq:template to helloworld component and it works as expected!
Regards,
Santosh
Hi @danielchido ,
The issue could be with missing node for embed component in the content , that you need to create your component for embed using cq:template node under main component you are trying to add.
Tried embedding with cq:template to helloworld component and it works as expected!
Regards,
Santosh
Thank you, this solved my problem.
Views
Likes
Replies