Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-106311

Comments taglib in Asset Publisher TPL: NullPointer for Alloy Editor

    Details

    • Fix Priority:
      3

      Description

      I've inserted a comment discussion component inside an Asset Publisher Template with the following code:

      <#assign discussionURL = renderResponse.createActionURL() />
      ${discussionURL.setParameter("javax.portlet.action", "invokeTaglibDiscussion")}
      <@liferay_comment["discussion"]
        className=entry.getClassName()
        classPK=entry.getClassPK()
        formAction=discussionURL?string
        formName="fm" + entry.getClassPK()?string
        ratingsEnabled=false
        redirect=currentURL
        userId=entry.getUserId()
      />

      This creates a partial version of comments component: the problem is that the Alloy Editor to insert a comment is missing!
      Inside logs I can see that a NullPointerException is

      thrown:java.lang.NullPointerException
       at com.liferay.taglib.ui.InputEditorTag$LazyDataInvocationHandler.invoke(InputEditorTag.java:598)
       at org.apache.jsp.alloyeditor_jsp._jspService(alloyeditor_jsp.java:219)
       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
       at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:319)
       at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:330)
       at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
       at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62)
       at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:120)
       at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
       at com.liferay.portal.servlet.DirectServletPathRegisterDispatcher.include(DirectServletPathRegisterDispatcher.java:67)
       at com.liferay.portal.servlet.DirectRequestDispatcherFactoryImpl$IndirectRequestDispatcher.include(DirectRequestDispatcherFactoryImpl.java:202)
       at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:79)
       at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
       at com.liferay.taglib.util.IncludeTag.includePage(IncludeTag.java:401)
       at com.liferay.taglib.ui.InputEditorTag.includePage(InputEditorTag.java:459)

      Debugging a little bit, I found that the issue seems to be at line 26 of modules/apps/frontend-editor/frontend-editor-alloyeditor-web/src/main/resources/META-INF/resources/alloyeditor.jsp:

      Map<String, Object> data = (Map<String, Object>)request.getAttribute(AlloyEditorConstants.ATTRIBUTE_NAMESPACE + ":data");

      I don't know if the problem is the assignment or casting to a Map but I cannot make a System.out.println() after that line.
      Have you got any hint or workaround?

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            caneta Alessandro
            Participants of an Issue:
            Recent user:
            Cleydyr Albuquerque
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              1 year, 5 weeks ago

                Packages

                Version Package