Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-14767

Deleting a wiki component xobject break the document

    Details

    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      The code does not expect a object to be null which is what happen when deleting one so any new add will crash the listener.

      To reproduce:

      • make you user advanced
      • create a new page and add a UIExtension object to it with "toto" in extension point and id fields
      • save
      • edit and remove the object

      -> error in the log

      2017-10-19 12:38:03,586 [http://127.0.0.1:8080/xwiki/bin/objectremove/Test/Component/WebHome?form_token=Pe5gQ3eRdoxX9hu2yMxhww&classname=XWiki.UIExtensionClass&classid=0&xredirect=%2Fxwiki%2Fbin%2Fedit%2FTest%2FComponent%2FWebHome%3Feditor%3Dobject] ERROR .o.i.DefaultObservationManager - Failed to send event [org.xwiki.bridge.event.DocumentUpdatedEvent@54e44e66] to listener [org.xwiki.component.wiki.internal.bridge.DefaultWikiObjectComponentManagerEventListener@512715cb] 
      java.lang.NullPointerException: null
      	at org.xwiki.component.wiki.internal.bridge.DefaultWikiObjectComponentManagerEventListener.registerObjectComponents(DefaultWikiObjectComponentManagerEventListener.java:125)
      	at org.xwiki.component.wiki.internal.bridge.DefaultWikiObjectComponentManagerEventListener.handleDocumentEvents(DefaultWikiObjectComponentManagerEventListener.java:112)
      	at org.xwiki.component.wiki.internal.bridge.DefaultWikiObjectComponentManagerEventListener.onEvent(DefaultWikiObjectComponentManagerEventListener.java:94)
      	at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:304)
      	at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:269)
      	at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1777)
      	at com.xpn.xwiki.web.ObjectRemoveAction.action(ObjectRemoveAction.java:81)
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:446)
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:210)
      	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
      	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
      	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
      	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
      	at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:112)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
              ...
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tmortagne Thomas Mortagne
                Reporter:
                tmortagne Thomas Mortagne
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: