Wiki source code of Version Summary Parameters

Last modified by Eleni Cojocariu on 2026/10/28 09:53

Hide last authors
Eleni Cojocariu 2.1 1 The four properties below live in ##xwiki/WEB-INF/xwiki.cfg## and are read at startup, so a change takes effect on the next restart. Two of them also have a field in the wiki administration, which applies without a restart.
2
3 |=Property|=What it does|=Default in code|=Shipped as|=Administration field
4 |##xwiki.editcomment##|Offers the version summary field in the editor|##0##|##1##, uncommented|##editcomment##
5 |##xwiki.editcomment.mandatory##|Refuses to save a Page until a summary is given|##0##|##0##, uncommented|##editcomment_mandatory##
6 |##xwiki.editcomment.suggested##|Asks once when the summary is empty, then saves anyway. Has no effect while ##mandatory## is on|##0##|##0##, commented out|None
7 |##xwiki.editcomment.hidden##|Replaces the field with that prompt, which becomes the only way to enter a summary|##0##|##0##, commented out|None
8
9 So a stock instance offers the summary field, leaves it optional and displays it: the defaults in the code are not what a reader has, because the shipped ##xwiki.cfg## sets the first two itself. ##xwiki.editcomment.hidden## is the one to read twice: it is ##1## that hides the field, and ##0##, its default, that displays it.
10
11 == Which setting wins ==
12
13 Each property is read in two places, and the wiki administration is consulted first:
14
Eleni Cojocariu 6.1 15 * The field on the wiki's ##XWiki.XWikiPreferences## object, when it holds exactly ##1## or ##0##. The administration's "Yes" and "No" store those two values.
Eleni Cojocariu 2.1 16 * Otherwise ##xwiki.cfg##, which is therefore the default for the whole wiki rather than an override of it.
17
Eleni Cojocariu 6.1 18 An unset field is a third state, not a "No": a Boolean field that nobody has touched is empty, and an empty value falls through to the configuration file. The two properties without an administration field can only be set in ##xwiki.cfg##, and none of the four can be set per Page, unlike the [[page tabs>>doc:documentation.xs.admin.base.page.show-hide-page-tabs.WebHome]].
Eleni Cojocariu 2.1 19
20 {{code language="none"}}
21 #-# Use edit comments
22 xwiki.editcomment=1
23
24 #-# Hide editcomment field and only use Javascript
25 # xwiki.editcomment.hidden=0
26
27 #-# Make edit comment mandatory
28 xwiki.editcomment.mandatory=0
29
30 #-# Make edit comment suggested (asks 1 time if the comment is empty.
31 #-# 1 shows one popup if comment is empty.
32 #-# 0 means there is no popup.
33 #-# This setting is ignored if mandatory is set
34 # xwiki.editcomment.suggested=0
35 {{/code}}
36
37 The shipped file calls these "edit comments", which is the name the properties were given before the interface settled on "version summary". They are the same thing.

Get Connected