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

Page history is permanently lost when a page containing attachments is moved

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      Steps to reproduce:

      1. Create a page

      2. Edit the page to create some history

      3. Attach some file to the page (it does not matter the type)

      4. Move the page to a different location

       

      Expected result:

      When checking the history tab of the moved page, all the page's history is listed

       

      Actual result:

      All the history is missing, except for the move "Update document after refactoring."

       

       

       

      This happens to:

      • both non-terminal and terminal pages;
      • it does not matter if I'm the creator of the page, or not.
      • The type of attachment does not matter;
      • Once you try to move a page with attachments, you will lose the history.  If you move it again, you will continue to lose its history even if you no longer add attachments to it;

       

       

      After moving the page, this is listed in the logs:

      2024-05-23 11:30:52,328 [task-manager-consumer] WARN  o.x.i.i.DefaultTasksManager    - Error during the execution of task [org.xwiki.index.internal.TaskData@281f964a[timestamp=1716453052323,docId=8020281166302250838,type=mention,attempts=1,stop=false,wikiId=xwiki,version=5.1]] for document [xwiki:Main.test555.WebHome]. Cause: [NullPointerException: Cannot invoke "com.xpn.xwiki.doc.XWikiDocument.getDocumentReferenceWithLocale()" because "doc" is null].
      2024-05-23 11:30:52,331 [task-manager-consumer] WARN  o.x.i.i.DefaultTasksManager    - Error during the execution of task [org.xwiki.index.internal.TaskData@281f964a[timestamp=1716453052328,docId=8020281166302250838,type=mention,attempts=2,stop=false,wikiId=xwiki,version=5.1]] for document [xwiki:Main.test555.WebHome]. Cause: [NullPointerException: Cannot invoke "com.xpn.xwiki.doc.XWikiDocument.getDocumentReferenceWithLocale()" because "doc" is null].
      2024-05-23 11:30:52,333 [task-manager-consumer] WARN  o.x.i.i.DefaultTasksManager    - Error during the execution of task [org.xwiki.index.internal.TaskData@281f964a[timestamp=1716453052331,docId=8020281166302250838,type=mention,attempts=3,stop=false,wikiId=xwiki,version=5.1]] for document [xwiki:Main.test555.WebHome]. Cause: [NullPointerException: Cannot invoke "com.xpn.xwiki.doc.XWikiDocument.getDocumentReferenceWithLocale()" because "doc" is null].
      2024-05-23 11:30:52,334 [task-manager-consumer] WARN  o.x.i.i.DefaultTasksManager    - Error during the execution of task [org.xwiki.index.internal.TaskData@281f964a[timestamp=1716453052333,docId=8020281166302250838,type=mention,attempts=4,stop=false,wikiId=xwiki,version=5.1]] for document [xwiki:Main.test555.WebHome]. Cause: [NullPointerException: Cannot invoke "com.xpn.xwiki.doc.XWikiDocument.getDocumentReferenceWithLocale()" because "doc" is null].
      2024-05-23 11:30:52,336 [task-manager-consumer] WARN  o.x.i.i.DefaultTasksManager    - Error during the execution of task [org.xwiki.index.internal.TaskData@281f964a[timestamp=1716453052335,docId=8020281166302250838,type=mention,attempts=5,stop=false,wikiId=xwiki,version=5.1]] for document [xwiki:Main.test555.WebHome]. Cause: [NullPointerException: Cannot invoke "com.xpn.xwiki.doc.XWikiDocument.getDocumentReferenceWithLocale()" because "doc" is null].
      2024-05-23 11:30:52,339 [task-manager-consumer] WARN  o.x.i.i.DefaultTasksManager    - Error during the execution of task [org.xwiki.index.internal.TaskData@281f964a[timestamp=1716453052336,docId=8020281166302250838,type=mention,attempts=6,stop=false,wikiId=xwiki,version=5.1]] for document [xwiki:Main.test555.WebHome]. Cause: [NullPointerException: Cannot invoke "com.xpn.xwiki.doc.XWikiDocument.getDocumentReferenceWithLocale()" because "doc" is null].
      2024-05-23 11:30:52,342 [task-manager-consumer] WARN  o.x.i.i.DefaultTasksManager    - Error during the execution of task [org.xwiki.index.internal.TaskData@281f964a[timestamp=1716453052339,docId=8020281166302250838,type=mention,attempts=7,stop=false,wikiId=xwiki,version=5.1]] for document [xwiki:Main.test555.WebHome]. Cause: [NullPointerException: Cannot invoke "com.xpn.xwiki.doc.XWikiDocument.getDocumentReferenceWithLocale()" because "doc" is null].
      2024-05-23 11:30:52,344 [task-manager-consumer] WARN  o.x.i.i.DefaultTasksManager    - Error during the execution of task [org.xwiki.index.internal.TaskData@281f964a[timestamp=1716453052342,docId=8020281166302250838,type=mention,attempts=8,stop=false,wikiId=xwiki,version=5.1]] for document [xwiki:Main.test555.WebHome]. Cause: [NullPointerException: Cannot invoke "com.xpn.xwiki.doc.XWikiDocument.getDocumentReferenceWithLocale()" because "doc" is null].
      2024-05-23 11:30:52,351 [task-manager-consumer] WARN  o.x.i.i.DefaultTasksManager    - Error during the execution of task [org.xwiki.index.internal.TaskData@281f964a[timestamp=1716453052345,docId=8020281166302250838,type=mention,attempts=9,stop=false,wikiId=xwiki,version=5.1]] for document [xwiki:Main.test555.WebHome]. Cause: [NullPointerException: Cannot invoke "com.xpn.xwiki.doc.XWikiDocument.getDocumentReferenceWithLocale()" because "doc" is null].
      2024-05-23 11:30:52,353 [task-manager-consumer] WARN  o.x.i.i.DefaultTasksManager    - Error during the execution of task [org.xwiki.index.internal.TaskData@281f964a[timestamp=1716453052351,docId=8020281166302250838,type=mention,attempts=10,stop=false,wikiId=xwiki,version=5.1]] for document [xwiki:Main.test555.WebHome]. Cause: [NullPointerException: Cannot invoke "com.xpn.xwiki.doc.XWikiDocument.getDocumentReferenceWithLocale()" because "doc" is null].
      2024-05-23 11:30:52,354 [task-manager-consumer] ERROR o.x.i.i.DefaultTasksManager    - [org.xwiki.index.internal.TaskData@281f964a[timestamp=1716453052351,docId=8020281166302250838,type=mention,attempts=10,stop=false,wikiId=xwiki,version=5.1]] abandoned because it has failed too many times.
      java.lang.NullPointerException: Cannot invoke "com.xpn.xwiki.doc.XWikiDocument.getDocumentReferenceWithLocale()" because "doc" is null
              at org.xwiki.index.internal.TaskExecutor.internalExecute(TaskExecutor.java:103)
              at org.xwiki.index.internal.TaskExecutor.execute(TaskExecutor.java:83)
              at org.xwiki.index.internal.DefaultTasksManager.consume(DefaultTasksManager.java:226)
              at org.xwiki.index.internal.DefaultTasksManager.run(DefaultTasksManager.java:209)
              at java.base/java.lang.Thread.run(Thread.java:842) 

       

       

       

      Attachments

        Issue Links

          Activity

            People

              surli Simon Urli
              Lucian Chevereseanu Lucian Chevereseanu
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: