This issue has been created
There is 1 update.
 
 
XWiki Platform / cid:jira-generated-image-avatar-c936111e-f48f-403a-9859-58b3750f6ee8 XWIKI-22182 Open

Page history is missing after a page containing attachments is moved

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-3a3c0766-9a2f-4999-ac32-f1969bf1fa0b Lucian Chevereseanu created this issue on 23/May/24 10:47
 
Summary: Page history is missing after a page containing attachments is moved
Issue Type: cid:jira-generated-image-avatar-c936111e-f48f-403a-9859-58b3750f6ee8 Bug
Affects Versions: 16.3.1
Assignee: Unassigned
Attachments: image-2024-05-23-11-38-55-579.png, image-2024-05-23-11-40-34-189.png
Created: 23/May/24 10:47
Priority: cid:jira-generated-image-static-major-63089374-84bd-48c6-9499-10caf19db2ba Major
Reporter: Lucian Chevereseanu
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) 

 

 

 

 
 

1 update

 
cid:jira-generated-image-avatar-3a3c0766-9a2f-4999-ac32-f1969bf1fa0b Changes by Lucian Chevereseanu on 23/May/24 10:49
 
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."

 

!image-2024-05-23-11-38-55-579.png|thumbnail!

 

!image-2024-05-23-11-40-34-189.png|thumbnail!

 

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:


{code:java}
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) {code}