Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-12127

Cancel of new document throws NPE

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 13.4.0
    • 13.4.0
    • None
    • None

    Description

      The new 'Cancel' button that discards changes in a document creates an NPE when clicked in a brand new document.

      Steps to reproduce:

      1. Create a new document
      2. Click 'Cancel' in the toolbar
      3. Click 'Discard' in the dialog

      Expected: the dialog disappears and the new document is deleted

      Actual: the dialog stays and an exception is logged:

      16.08.2019 16:28:59 ERROR http-nio-8080-exec-9 [DefaultExceptionMapper.mapUnexpectedExceptions:170] Unexpected error occurred
       java.lang.NullPointerException: null
          at org.hippoecm.frontend.editor.HippostdPublishableEditor.getMode(HippostdPublishableEditor.java:191) ~[hippo-cms-workflow-frontend-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.frontend.editor.HippostdPublishableEditor.refresh(HippostdPublishableEditor.java:689) ~[hippo-cms-workflow-frontend-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.frontend.plugins.cms.edit.EditorManagerPlugin.refresh(EditorManagerPlugin.java:208) ~[hippo-cms-perspectives-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at java.util.ArrayList.forEach(ArrayList.java:1257) ~[?:1.8.0_201]
          at org.hippoecm.frontend.PluginPage.processEvents(PluginPage.java:213) ~[hippo-cms-engine-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.frontend.PluginRequestTarget.respond(PluginRequestTarget.java:147) ~[hippo-cms-api-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:895) ~[wicket-core-7.11.0.jar:7.11.0]
          at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) ~[wicket-request-7.11.0.jar:7.11.0]
          at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:97) ~[wicket-request-7.11.0.jar:7.11.0]
          at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265) [wicket-core-7.11.0.jar:7.11.0]
          at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222) [wicket-core-7.11.0.jar:7.11.0]
          at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293) [wicket-core-7.11.0.jar:7.11.0]
          at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261) [wicket-core-7.11.0.jar:7.11.0]
          at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203) [wicket-core-7.11.0.jar:7.11.0]
          at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284) [wicket-core-7.11.0.jar:7.11.0]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.20]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.20]
          at org.hippoecm.frontend.plugins.login.ConcurrentLoginFilter.doFilter(ConcurrentLoginFilter.java:54) [hippo-cms-login-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.20]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.20]
          at org.hippoecm.hst.core.container.FilterChainInvokingValve.invoke(FilterChainInvokingValve.java:72) [hst-core-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [hst-core-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.hst.core.container.JCRSessionStatefulConcurrencyValve.invoke(JCRSessionStatefulConcurrencyValve.java:56) [hst-core-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [hst-core-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.hst.core.container.SubjectBasedSessionValve.invoke(SubjectBasedSessionValve.java:58) [hst-core-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [hst-core-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.hst.core.container.SecurityValve.invoke(SecurityValve.java:177) [hst-core-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [hst-core-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.hst.core.container.LocalizationValve.invoke(LocalizationValve.java:101) [hst-core-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [hst-core-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.hst.core.container.CmsSecurityValve.invoke(CmsSecurityValve.java:60) [hst-core-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [hst-core-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.hst.core.container.InitializationValve.invoke(InitializationValve.java:40) [hst-core-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288) [hst-core-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.hst.core.container.HstSitePipeline.invokeValves(HstSitePipeline.java:173) [hst-core-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.hst.core.container.HstSitePipeline.invoke(HstSitePipeline.java:155) [hst-core-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.hst.core.container.HstRequestProcessorImpl.processRequest(HstRequestProcessorImpl.java:81) [hst-core-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.hst.container.HstDelegateeFilterBean.doFilter(HstDelegateeFilterBean.java:497) [hst-core-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.hst.container.DelegatingFilter.doFilter(DelegatingFilter.java:68) [hst-commons-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.hippoecm.hst.container.HstFilter.doFilter(HstFilter.java:51) [hst-commons-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.20]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.20]
          at org.onehippo.cms7.utilities.servlet.ProxyFilter.doFilter(ProxyFilter.java:126) [hippo-cms7-utilities-13.4.0-SNAPSHOT.jar:13.4.0-SNAPSHOT]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.20]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.20]
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200) [catalina.jar:9.0.20]
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:9.0.20]
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) [catalina.jar:9.0.20]
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [catalina.jar:9.0.20]
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [catalina.jar:9.0.20]
          at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678) [catalina.jar:9.0.20]
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [catalina.jar:9.0.20]
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [catalina.jar:9.0.20]
          at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) [tomcat-coyote.jar:9.0.20]
          at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:9.0.20]
          at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:836) [tomcat-coyote.jar:9.0.20]
          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1839) [tomcat-coyote.jar:9.0.20]
          at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:9.0.20]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_201]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_201]
          at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:9.0.20]
          at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201]
      

      The dialog can now only be closed by clicking the 'X' button in the top-right corner (the 'Cancel' and 'Discard' button don't respond anymore). The document is deleted correctly.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mdenburger Mathijs den Burger (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: