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

Error when deleting a page history range to the latest one, leaving first revision unselected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 15.5.2, 15.7-rc-1, 14.10.15
    • 15.5, 14.10.7
    • Old Core
    • Windows 11 Pro, Chrome 115, using a local instance of XWiki 14.10.14 on Jetty/HSQLDB
    • Integration
    • Unknown
    • N/A
    • N/A

    Description

      Steps to reproduce

      1. Create a page (which will have version 1.1)
      2. Edit the page at least 3 times and click 'Save & View' after each edit (so the last version will be 4.1)
      3. Go to page History tab
      4. Select the range From 2.1 - To 4.1 (latest revision)
      5. Click 'Delete selected version range' buttonĀ (Click OK when prompted)

      Expected results

      The page range is deleted without any errors.

      Actual results

      A Notice is displayed in the browser:

      A problem occurred while trying to process your request. Please contact the webmaster if this happens again.

      with the same stacktrace in the logs:

      2023-07-31 14:55:05,005 [qtp455538610-22 - http://localhost:1414/xwiki/bin/deleteversions/Pag1/?confirm=1] WARN  c.x.x.w.XWikiAction            - Uncaught exception: Error number 3103 in 3: Exception while reading version [1.1] for document id [204.026.046.720.559.769]
      com.xpn.xwiki.XWikiException: Error number 3103 in 3: Exception while reading version [1.1] for document id [204.026.046.720.559.769]
              at com.xpn.xwiki.doc.XWikiDocumentArchive.loadDocument(XWikiDocumentArchive.java:404)
              at com.xpn.xwiki.store.XWikiHibernateVersioningStore.loadXWikiDoc(XWikiHibernateVersioningStore.java:213)
              at com.xpn.xwiki.internal.doc.DatabaseDocumentRevisionProvider.loadRevision(DatabaseDocumentRevisionProvider.java:95)
              at com.xpn.xwiki.internal.doc.DatabaseDocumentRevisionProvider.getRevision(DatabaseDocumentRevisionProvider.java:78)
              at com.xpn.xwiki.internal.doc.DatabaseDocumentRevisionProvider.getRevision(DatabaseDocumentRevisionProvider.java:61)
              at com.xpn.xwiki.internal.doc.DefaultDocumentRevisionProvider.getRevision(DefaultDocumentRevisionProvider.java:103)
              at com.xpn.xwiki.internal.doc.AbstractDocumentRevisionProvider.getRevision(AbstractDocumentRevisionProvider.java:46)
              at com.xpn.xwiki.XWiki.rollback(XWiki.java:7608)
              at com.xpn.xwiki.XWiki.deleteDocumentVersions(XWiki.java:4757)
              at com.xpn.xwiki.web.DeleteVersionsAction.action(DeleteVersionsAction.java:68)
              at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:636)
              at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:339)
              at com.xpn.xwiki.web.LegacyActionServlet.service(LegacyActionServlet.java:114)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
              at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1419)
              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764)
              at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1624)
              at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
              at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
              at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1594)
              at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:61)
              at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
              at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1594)
              at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
              at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
              at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1594)
              at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
              at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
              at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1594)
              at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
              at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
              at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1594)
              at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
              at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:210)
              at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1594)
              at org.eclipse.jetty.websocket.servlet.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:164)
              at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
              at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1594)
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:506)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131)
              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223)
              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1571)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1378)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:463)
              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1544)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)
              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1300)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
              at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:192)
              at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:51)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
              at org.eclipse.jetty.server.Server.handle(Server.java:562)
              at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:418)
              at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:675)
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:410)
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:282)
              at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:319)
              at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
              at org.eclipse.jetty.io.SocketChannelEndPoint$1.run(SocketChannelEndPoint.java:101)
              at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:412)
              at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:381)
              at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:268)
              at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:138)
              at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:407)
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:894)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1038)
              at java.base/java.lang.Thread.run(Thread.java:833)
      Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while hibernate execute
              at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:835)
              at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeRead(XWikiHibernateBaseStore.java:902)
              at com.xpn.xwiki.store.XWikiHibernateVersioningStore.loadRCSNodeContent(XWikiHibernateVersioningStore.java:339)
              at com.xpn.xwiki.doc.rcs.XWikiRCSNodeInfo.getContent(XWikiRCSNodeInfo.java:195)
              at com.xpn.xwiki.doc.XWikiDocumentArchive.loadRCSNodeContents(XWikiDocumentArchive.java:521)
              at com.xpn.xwiki.doc.XWikiDocumentArchive.getVersionXml(XWikiDocumentArchive.java:423)
              at com.xpn.xwiki.doc.XWikiDocumentArchive.loadDocument(XWikiDocumentArchive.java:388)
              ... 70 common frames omitted
      Caused by: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.xpn.xwiki.doc.rcs.XWikiRCSNodeContent#com.xpn.xwiki.doc.rcs.XWikiRCSNodeId@313515a[docId=204026046720559769,version=2.1,wikiReference=Wiki xwiki]]
              at org.hibernate.boot.internal.StandardEntityNotFoundDelegate.handleEntityNotFound(StandardEntityNotFoundDelegate.java:28)
              at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:216)
              at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:327)
              at org.hibernate.event.internal.DefaultLoadEventListener.doOnLoad(DefaultLoadEventListener.java:108)
              at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:74)
              at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:118)
              at org.hibernate.internal.SessionImpl.fireLoadNoChecks(SessionImpl.java:1231)
              at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1220)
              at org.hibernate.internal.SessionImpl.load(SessionImpl.java:996)
              at org.hibernate.engine.spi.SessionDelegatorBaseImpl.load(SessionDelegatorBaseImpl.java:820)
              at com.xpn.xwiki.store.XWikiHibernateVersioningStore.lambda$loadRCSNodeContent$4(XWikiHibernateVersioningStore.java:341)
              at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:826)
              ... 76 common frames omitted

      The issue reproduction seems to be specific as it doesn't reproduce if selecting From 1.1 - To 4.1, 1.1 to 3.1, 2.1 to 3.1 or 3.1 to 4.1.

      The issue reproduces also on XWiki 15.5 and 14.10.7, but it could not be reproduced on XWiki 14.10.6.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              iandriuta Ilie Andriuta
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: