Version Summary Parameters

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

Reference

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.

PropertyWhat it doesDefault in codeShipped asAdministration field
xwiki.editcommentOffers the version summary field in the editor01, uncommentededitcomment
xwiki.editcomment.mandatoryRefuses to save a Page until a summary is given00, uncommentededitcomment_mandatory
xwiki.editcomment.suggestedAsks once when the summary is empty, then saves anyway. Has no effect while mandatory is on00, commented outNone
xwiki.editcomment.hiddenReplaces the field with that prompt, which becomes the only way to enter a summary00, commented outNone

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.

Which setting wins

Each property is read in two places, and the wiki administration is consulted first:

  • 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.
  • Otherwise xwiki.cfg, which is therefore the default for the whole wiki rather than an override of it.

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.

#-# Use edit comments
xwiki.editcomment=1

#-# Hide editcomment field and only use Javascript
# xwiki.editcomment.hidden=0

#-# Make edit comment mandatory
xwiki.editcomment.mandatory=0

#-# Make edit comment suggested (asks 1 time if the comment is empty.
#-# 1 shows one popup if comment is empty.
#-# 0 means there is no popup.
#-# This setting is ignored if mandatory is set
# xwiki.editcomment.suggested=0

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.

FAQ

Why do only two of them have an administration field?

Because only editcomment and editcomment_mandatory are declared on the XWiki.XWikiPreferences class. XWiki does look for a preference field for the other two, so a field added by hand would be honoured, but nothing creates one and no screen displays it.

Related

Get Connected