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

Descriptor page for a subwiki does not re-create correctly after deletion

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 8.4.6, 9.11.2
    • Fix Version/s: None
    • Component/s: Wiki
    • Labels:
      None
    • Environment:
      Windows 10 Pro 64 bit, IE 11, using a local instance XWiki 9.11.2 on MySQL 5.7
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      STEPS TO REPRODUCE:

      Preconditions: Have a fresh HSQLDB/Jetty XWiki instance available.

      1. Login as Admin
      2. Go to Wiki Index
      3. Create a new subwiki (e.g. 'subwikiglobal') and verify it appears in the Wiki Index
      4. Delete the new subwiki's descriptor page
      5. Re-create the page manually (with same name) by adding an XWikiServerClass xobject
      6. Fill in the information as existed on the old (deleted) descriptor page
      7. Click 'Save & View' to save the page
      8. Go to Wiki Index

      EXPECTED RESULTS

      As the previously deleted descriptor page was re-created, the subwiki (e.g. 'subwikiglobal') appears back in the Wiki Index.

      ACTUAL RESULTS

      When the re-created descriptor's page is saved, its title changed from

      Descriptor of the wiki "subwikiglobal"

      (as it was initially) to

      Descriptor of the wiki "webhome"

      I don't know if that's the reason, but the subwiki 'subwikiglobal' does not appear back in the wiki index.

      Moreover, on the new descriptor's page 'Descriptor of the wiki "webhome"', when added a WikiManagerTemplate class, I got the following NPE:

      2018-02-08 10:03:17,412 [http://localhost:9112/xwiki/bin/edit/XWiki/XWikiServerSubwikiglobal/?xpage=editobject&xaction=addObject&className=WikiManager.WikiTemplateClass] ERROR .o.i.DefaultObservationManager - Failed to send event [org.xwiki.bridge.event.DocumentUpdatedEvent@cf8cc793] to listener [org.xwiki.wiki.internal.descriptor.listener.WikiDescriptorListener@7340e132]
      java.lang.NullPointerException: Null keys are not supported!
              at org.infinispan.cache.impl.CacheImpl.assertKeyNotNull(CacheImpl.java:227)
              at org.infinispan.cache.impl.CacheImpl.remove(CacheImpl.java:550)
              at org.infinispan.cache.impl.CacheImpl.remove(CacheImpl.java:546)
              at org.xwiki.cache.infinispan.internal.InfinispanCache.remove(InfinispanCache.java:85)
              at org.xwiki.wiki.internal.manager.WikiDescriptorCache.remove(WikiDescriptorCache.java:129)
              at org.xwiki.wiki.internal.descriptor.listener.WikiDescriptorListener.removeExistingDescriptor(WikiDescriptorListener.java:113)
              at org.xwiki.wiki.internal.descriptor.listener.WikiDescriptorListener.onEvent(WikiDescriptorListener.java:91)
              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:1812)
              at com.xpn.xwiki.api.Document.saveDocument(Document.java:2521)
              at com.xpn.xwiki.api.Document.save(Document.java:2407)
              at com.xpn.xwiki.api.Document.save(Document.java:2396)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
              at java.lang.reflect.Method.invoke(Unknown Source)
              at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395)
              at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)
              at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173)
              at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
              at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:567)
              at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
              at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
              at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
              at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
              at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
              at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
              at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
              at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
              at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluateInternal(DefaultVelocityEngine.java:259)
              at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:222)
              at com.xpn.xwiki.render.DefaultVelocityManager.evaluate(DefaultVelocityManager.java:361)
              at com.xpn.xwiki.internal.template.InternalTemplateManager.evaluateContent(InternalTemplateManager.java:820)
              at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:696)
              at com.xpn.xwiki.internal.template.InternalTemplateManager.lambda$renderFromSkin$0(InternalTemplateManager.java:671)
              at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:85)
              at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:670)
              at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:649)
              at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:635)
              at com.xpn.xwiki.internal.template.DefaultTemplateManager.render(DefaultTemplateManager.java:78)
              at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:2174)
              at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:180)
              at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:462)
              at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:209)
              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:860)
              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)
              at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:127)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
              at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
              at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
              at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
              at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:134)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1629)
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
              at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:219)
              at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
              at org.eclipse.jetty.server.Server.handle(Server.java:530)
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)
              at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
              at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
              at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
              at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
              at java.lang.Thread.run(Unknown Source)

      I've also attached the screenshots.

        Attachments

        1. S1 (Initial_sub_wiki).jpg
          S1 (Initial_sub_wiki).jpg
          136 kB
        2. S2 (Initial_sub_wiki_descriptor).jpg
          S2 (Initial_sub_wiki_descriptor).jpg
          248 kB
        3. S3 (New_descriptor).jpg
          S3 (New_descriptor).jpg
          356 kB
        4. S4 (Confirmation).jpg
          S4 (Confirmation).jpg
          192 kB
        5. Owner_after_change.jpg
          Owner_after_change.jpg
          154 kB
        6. Owner_subwiki1.jpg
          Owner_subwiki1.jpg
          150 kB
        7. Owner_subwiki2.jpg
          Owner_subwiki2.jpg
          168 kB
        8. Wiki_Index_recreated.jpg
          Wiki_Index_recreated.jpg
          136 kB

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              iandriuta Ilie Andriuta
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Date of First Response: