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

Cannot correctly restore previous version of document of a non-basic type

    Details

      Description

      Steps to reproduce

      1. Create a document D of type Marketing Banner, filling some metadata fields.
      2. Edit document D and change its type to Contract. Then publish.
      3. Revert document D to version 1.0 (the type of which is Marketing Banner)

      Expected result
      The D document data is reverted to the previous version, including document type and metadata.

      Actual result
      The document D is reverted to the previous version, but metadata is not shown. Also, the following stacktrace can be seen in the logs.

      20:01:54,013 ERROR [http-bio-8080-exec-6][IncludeTag:128] Current URL /group/guest/~/control_panel/manage?p_p_id=com_liferay_document_library_web_portlet_DLAdminPortlet&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&_com_liferay_document_library_web_portlet_DLAdminPortlet_redirect=http%3A%2F%2Flocalhost%3A8080%2Fgroup%2Fguest%2F%7E%2Fcontrol_panel%2Fmanage%3Fp_p_id%3Dcom_liferay_document_library_web_portlet_DLAdminPortlet%26p_p_lifecycle%3D0%26p_p_state%3Dmaximized%26p_p_mode%3Dview&_com_liferay_document_library_web_portlet_DLAdminPortlet_fileEntryId=22001&_com_liferay_document_library_web_portlet_DLAdminPortlet_mvcRenderCommandName=%2Fdocument_library%2Fview_file_entry generates exception: java.lang.NullPointerException
      java.lang.NullPointerException
      	at com.liferay.dynamic.data.mapping.render.impl.DDMFormRendererImpl.isDDMFormFieldSkippable(DDMFormRendererImpl.java:98)
      	at com.liferay.dynamic.data.mapping.render.impl.DDMFormRendererImpl.render(DDMFormRendererImpl.java:48)
      	at com.liferay.dynamic.data.mapping.render.DDMFormRendererUtil.render(DDMFormRendererUtil.java:37)
      	at org.apache.jsp.html.start_jsp._jspService(start_jsp:313)
      	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
      	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:731)
      	at com.liferay.portal.servlet.jsp.compiler.JspServlet.service(JspServlet.java:303)
      	at com.liferay.portal.servlet.jsp.compiler.JspServlet.service(JspServlet.java:314)
      	at com.liferay.portal.wab.extender.internal.WabBundleProcessor$JspServletWrapper.service(WabBundleProcessor.java:610)
      	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:63)
      	at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:98)
      	at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:45)
      	at com.liferay.portal.servlet.DirectServletPathRegisterDispatcher.include(DirectServletPathRegisterDispatcher.java:67)
      	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:75)
      	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:52)
      

        Attachments

        1. fix.png
          fix.png
          57 kB
        2. reproduce.png
          reproduce.png
          28 kB

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 37 weeks, 3 days ago

                Packages

                Version Package
                7.0.0 Beta 5