Expand my Community achievements bar.

SOLVED

Including resource directly on page do not open the dialog when edit or design mode touch UI

Avatar

Level 2

I have included the component resource using sightly in the page as below

<sly data-sly-resource="${'footer' @ resourceType='my-app/components/structure/footer'}"></sly>

Even though the component does have dialog and design dialog created for component, neither of them shows up in the edit or design mode, while the dialog works on classic UI.

Is the expected behaviour?

1 Accepted Solution

Avatar

Correct answer by
Level 2

I have resolved it, it was an issue in the cq:design_dialog node tree.

View solution in original post

4 Replies

Avatar

Employee

The dialog should be presented. Can you try to replace sly with div?

Avatar

Level 2

Thanks for replying!

I tried embedding it in div that earlier, tried it again , still doesn't work.

<div data-sly-resource="${'footer' @ resourceType='news-reporter/components/structure/footer'}"></div>

I'm just thinking of adding the component under a parsys (set it up for template so that when user create the page it creates automatically).

But i would really like to work the dialog in the embedding way (do not want another parsys is shown below the footer)

I read an article explain the similar issue : http://aempodcast.com/2015/sightly/aem-sightly-touch-ui-tips/#.WCLS5_l97IU

But i don't feel the solution mentioned in the article is the correct way of doing it.

Please let me know if there is anything i can try fixing it.

Avatar

Level 2

Forgot to mention, Here is the error i can see in the log

09.11.2016 16:22:14.119 *ERROR* [0:0:0:0:0:0:0:1 [1478688734100] GET /content/news-reporter/en/news/top-stories.html HTTP/1.1] com.day.cq.wcm.core.impl.WCMDeveloperModeFilter Error during include of SlingRequestPathInfo: path='/content/news-reporter/en/news/top-stories/jcr:content/footer', selectorString='null', extension='html', suffix='null'
java.lang.NullPointerException: null
    at com.day.cq.wcm.core.impl.components.TouchEditContextImpl.getDesignDialogSrc(TouchEditContextImpl.java:436)
    at com.day.cq.wcm.core.impl.components.TouchEditContextImpl.drawEditing(TouchEditContextImpl.java:185)
    at com.day.cq.wcm.core.impl.components.TouchEditContextImpl.drawContentEpilog(TouchEditContextImpl.java:503)
    at com.day.cq.wcm.core.impl.components.EditContextImpl.includeEpilog(EditContextImpl.java:278)
    at com.day.cq.wcm.core.impl.components.ComponentContextImpl.includeEpilog(ComponentContextImpl.java:326)
    at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:266)
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
    at com.day.cq.wcm.core.impl.WCMDeveloperModeFilter.doFilterWithErrorHandling(WCMDeveloperModeFilter.java:159)
    at com.day.cq.wcm.core.impl.WCMDeveloperModeFilter.doFilter(WCMDeveloperModeFilter.java:130)
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
    at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282)
    at org.apache.sling.engine.impl.SlingRequestProcessorImpl.dispatchRequest(SlingRequestProcessorImpl.java:322)
    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:503)
    at com.adobe.cq.sightly.WCMScriptHelper.includeResource(WCMScriptHelper.java:165)
    at com.adobe.cq.sightly.internal.extensions.ResourceExtension.call(ResourceExtension.java:128)
    at org.apache.sling.scripting.sightly.impl.engine.runtime.RenderContextImpl.call(RenderContextImpl.java:66)
    at org.apache.sling.scripting.sightly.apps.news_reporter.components.structure.basepage.SightlyJava_footer.render(SightlyJava_footer.java:40)
    at org.apache.sling.scripting.sightly.impl.engine.runtime.RenderUnit.render(RenderUnit.java:54)
    at org.apache.sling.scripting.sightly.impl.engine.SightlyScriptEngine.evaluateScript(SightlyScriptEngine.java:92)
    at org.apache.sling.scripting.sightly.impl.engine.SightlyScriptEngine.eval(SightlyScriptEngine.java:78)
   

Avatar

Correct answer by
Level 2

I have resolved it, it was an issue in the cq:design_dialog node tree.