Wiki source code of Page Locking

Last modified by Eleni Cojocariu on 2026/03/19 07:54

Show last authors
1 When you edit a Page in XWiki, (with any editor except for the [[In-place WYSIWYG editor>>xwiki:documentation.xs.user.base.page.edit-page.WebHome]] or [[Standalone WYSIWYG editor>>xwiki:documentation.xs.user.base.page.edit-page.edit-standalone-wysiwyg-editor.WebHome]], which are real-time editors), a lock is put on the Page, by default, to prevent multiple users from editing the same Page simultaneously.
2
3 The lock remains active until you exit the edition of the Page (either saving and viewing the changes, or canceling using the [[common edit actions>>xwiki:documentation.xs.user.base.page.edit-page.common-edit-actions.WebHome]], or closing the browser window). If you keep the Page open in the browser, without doing any "Save" action, the lock will be active by default for 30 minutes. The duration [[can be configured>>xwiki:Documentation.AdminGuide.Configuration.WebHome||anchor="HLockDuration"]] by the administrator.
4
5 Anyone trying to edit a Page that is locked, will see a warning message allowing them to know that the page is locked:
6
7 {{image reference="locked.png" size="large" alt="The modal with the warning that the page is being locked by other user"/}}
8
9 The warning also provides an option to force the lock. If a user chooses to force the lock, they can edit the Page, but if another user has already saved changes to the same part of the Page, the last user to save will see a "Version Conflict" window and must [[resolve the edit conflicts>>xwiki:documentation.xs.user.base.page.edit-page.resolve-conflict-page.WebHome]] before their changes are applied.

Get Connected