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

Document type editor shows NPE when path of field is empty

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 2.21.07
    • 2.21.07
    • None
    • None

    Description

      The document type editor shows a NullPointerException when the path of a field is made empty.

      Steps to reproduce:
      1. edit a document type in the document type editor in the CMS
      2. add a new field (e.g. click 'String' under the 'Primitive Fields' section)
      3. empty the 'path' property of the added field (remove all characters)
      4. click somewhere in the editor or hit enter to refresh the editor

      Expected behavior: a warning is shown that the path cannot be empty, and the path is reverted to its original value
      Actual behavior: the message 'Unexcepted RuntimeException' is shown in the browser with the following root cause:

      Root cause:

      java.lang.NullPointerException
      at org.hippoecm.frontend.editor.builder.FieldEditor$1.setObject(FieldEditor.java:77)
      at org.hippoecm.frontend.editor.builder.FieldEditor$1.setObject(FieldEditor.java:57)
      at org.apache.wicket.Component.setDefaultModelObject(Component.java:3173)
      at org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1183)
      at org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior.onEvent(AjaxFormComponentUpdatingBehavior.java:155)
      at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
      at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:302)
      at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:157)
      at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
      at org.hippoecm.frontend.PluginRequestCycleProcessor.processEvents(PluginRequestCycleProcessor.java:95)
      at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1252)
      at org.apache.wicket.RequestCycle.step(RequestCycle.java:1331)
      at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1438)
      at org.apache.wicket.RequestCycle.request(RequestCycle.java:546)
      at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
      at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.hippoecm.frontend.ResourceRewriteFilter.doFilter(ResourceRewriteFilter.java:129)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.hippoecm.frontend.plugins.login.ConcurrentLoginFilter.doFilter(ConcurrentLoginFilter.java:54)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:589)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Thread.java:662)

      Attachments

        Activity

          People

            jsheriff Junaidh Kadhar Sheriff
            mdenburger Mathijs den Burger (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: