There are 3 updates, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-9ed4c09a-1790-4283-87d0-f62fcbcaacbf XWIKI-2470 Closed

Improve saving to not save data that has not changed

 
View issue   ยท   Add comment
 

3 updates

 
cid:jira-generated-image-avatar-7b8f185d-8dee-40b4-88b8-22474c5e2740 Changes by Marius Dumitru Florea on 21/Oct/25 10:14
 
Resolution: Fixed
Tests: Integration
Status: Open Closed
 
 

1 comment

 
cid:jira-generated-image-avatar-7b8f185d-8dee-40b4-88b8-22474c5e2740 Marius Dumitru Florea on 21/Oct/25 10:14
 

I introduced a new request parameter, named preventEmptyRevision, that can be passed to the SaveAction to avoid creating document revisions when there are no actual changes (author change being ignored). Note that preventEmptyRevision is ignored:

  • if the document is new (in order to be able to create an empty document)
  • if there is a submitted version summary comment (to allow the user to create a "milestone" version by summarizing the changes since the last milestone)
  • if the document was modified, obviously

Currently, only the realtime collaboration feature is sending this new request parameter in order to avoid creating useless revisions when users are leaving the edit mode. Existing code shouldn't be impacted by the changes brought by this issue (e.g. the Wiki editor or the non-realtime WYSIWYG editor are still creating empty revisions if you save without changes).