error

Last modified by Lucas Charpentier on 2026/10/27 10:28

Audit

Macro ID
error
Source
XS
Type
Wrapper
Classification reason

Status
Reviewed
Criteria version
15.20
XWiki version
18.8.0
Audit date
2026-10-14
Auditor
Compared macros
warning info

Sources

Where to gather the information the criteria are checked against, see Gather the sources.

SourceWhat it givesUsed forWhere
DocumentationParameters, default values and examples, including the most common exampleL2, L3, and the criteria measured with the most common examplehttps://www.xwiki.org/xwiki/bin/view/documentation/xs/user/base/page/edit/error-macro/
Source codeHow the macro declares its parameters and content: types, groups, features, advanced and hidden flags, constraints, content type, inline supportC4, C5, C7, C8, C9, C13, E4, E6https://github.com/xwiki/xwiki-rendering/blob/xwiki-rendering-18.8.0/xwiki-rendering-macros/xwiki-rendering-macro-message/src/main/java/org/xwiki/rendering/internal/macro/message/ErrorMessageMacro.java
Macro descriptorWhat the Edit Macro dialog is built from, on design.xwiki.orgD1, D2, C1 to C9, E4Descriptor, list of macros with their categories
TranslationsThe name, description and parameter names in each languageD1, D2, D4, C1l10n.xwiki.org
Uses in XWiki pagesHow XWiki itself uses the macro, a realistic example when the documentation has noneL3, C2, C3, C6, C8, C9Search the xwiki organization on GitHub
Compared macrosThe audits of the macros of the same typeL1, D3warning, info
Other sources specific to this macro
CriterionResultNotes
D1 wordingOK
D2 summaryKOthe description "Displays an error message note." repeats the name, and does not say that the message is shown in a highlighted box with an error icon.
D3 categoryOK
D4 quick-actionKOQuick Actions finds the macro for "error", "err", the French name "Message d'erreur" and the German word "Fehler", but under the name "Error Box": the macro name "Error Message" and the German name "Fehlerhinweis" give no result. The synonyms "alert", "danger", "failure", "problem" and "callout" do not find it, "fail" lists Notifications and Dashboard entries. In the Insert Macro dialog, "note" finds it in 1st position.
L1 consistencyOKcompared with warning and info. Both behave the same, they share the same Java class.
L2 doc-parametersOK
L3 doc-exampleOK
I1 patternOK
I2 zero-configKOthe content is mandatory, while an empty error box is a sensible result: {{error}}{{/error}} renders "Failed to execute the [error] macro. Cause: [The required content is missing.]" instead of an empty box. In the Edit Macro dialog, Submit with an empty content does nothing and shows no message. Quick Actions inserts a default text, and a content emptied in the editor saves and renders as an empty box.
I3 instantOK
I4 cursorKOminor: after insertion from Quick Actions, the cursor is at the start of the default text "Type your error message here.", which is real content and is not selected: typing adds to it, and the user has to delete it. Saving without editing keeps the default text in the page.
I5 focusN/A
E1 wysiwygOK
E2 errorsKOinvalid values are accepted silently, with no message. For example, {{error width="abc"}}This is an error message{{/error}} renders with style="width:abc" and no error; {{error image="missing.png"}}This is an error message{{/error}} renders a broken image, with no attachment missing.png on the page; {{error status="maybe"}}This is an error message{{/error}} is read as false. Only an empty content gives an error.
E3 nestingKOthe error macro renders in a list item, a table cell and a box, and a list, a table and a box render and can be edited inside its content. But in a list item and in a table cell it is inline, and its content cannot be edited in place: the content span is not editable.
E4 inline-supportOK
E5 emptyOKthe emptied content stays a full-width area that one click puts the cursor in.
E6 inplaceKOthe content of a standalone error macro is edited in place, but the Edit Macro dialog still shows it as a wiki syntax text area, also when editing an existing one. The content of an inline error macro, in a sentence, a list item or a table cell, can only be edited through that text area.

Parameters

ParameterC1 clarityC2 mandatoryC3 defaultsC4 input-assistanceC5 groupsC6 orderC7 alternativesC8 advancedC9 technicalC13 constraintsNotes
$contentOKOKN/AOKN/AOKN/AN/AN/AN/A

C4: edited in place for a standalone error macro; the wiki syntax text area of the dialog is recorded under E6.

cssClassKOOKOKOKOKOKN/AKOOKN/A

C1: the message macros have no translation keys for the parameters inherited from box, so the dialog shows the parameter ID "cssClass" in every language.

C8: a styling parameter that is rarely used, and no common example sets it, but it is not marked as advanced.

C9: no documentation example uses it. A realistic use is styling one message on an application page, which targets developers: it could rather be advanced.

imageOKOKOKKOOKOKN/AOKOKN/A

C4: a free text field, with no image picker; a reference to a missing attachment is accepted, for example {{error image="missing.png"}}This is an error message{{/error}} .

statusOKOKOKOKOKOKN/AOKOKN/A
titleOKOKOKOKOKOKN/AOKOKN/A

C6: the parameters are in alphabetical order, cssClass, image, title, width, status. The most common example sets none of them, so the order is OK per the measure, but title is the one users are most likely to set.

widthOKOKOKOKOKOKN/AOKOKKO

C13: only accepts a CSS length "in px or %", but declares no format: {{error width="abc"}}This is an error message{{/error}} is accepted by the dialog and output as style="width:abc".

KOs and tickets

Every KO needs a ticket covering it, see Report the KOs. One ticket can cover several KOs. Known issues filed for this macro are suggested in italics: link them as existing tickets when they cover the KO.

KOCriterionExisting ticketsNew tickets
D2D2 summaryXWIKI-25492
D4D4 quick-actionXWIKI-25444, XWIKI-25445 (partial), XWIKI-25531 (partial)
I2I2 zero-configXRENDERING-827
I4I4 cursorXWIKI-24152
E2E2 errorsXCOMMONS-3847 (partial), XRENDERING-823 (partial), XRENDERING-826 (partial), XRENDERING-828 (partial)
E3E3 nestingXWIKI-19954, XWIKI-23309 (partial)
E6E6 inplaceXWIKI-19954 (partial)XWIKI-25443
C1:cssClassC1 clarity, cssClassXWIKI-25492
C8:cssClassC8 advanced, cssClassXRENDERING-824
C4:imageC4 input-assistance, imageXRENDERING-828
C13:widthC13 constraints, widthXRENDERING-826
Success

Every KO is covered by a ticket.

Tickets

TicketOriginKOs coveredKOs partly covered
XWIKI-19954ExistingE3E6
XWIKI-23309ExistingE3
XWIKI-24152ExistingI4
XCOMMONS-3847NewE2
XRENDERING-823NewE2
XWIKI-25443NewE6
XWIKI-25444NewD4
XWIKI-25445NewD4
XWIKI-25492NewC1:cssClass D2
XRENDERING-824NewC8:cssClass
XRENDERING-826NewC13:widthE2
XRENDERING-827NewI2
XRENDERING-828NewC4:imageE2
XWIKI-25531NewD4

Known issues of this macro

IssueTitleStatusCriteria
XWIKI-22028CKEditor / Xwiki 2.1 Syntax: Multi-paragraph Highlighting BoxesOpen
XWIKI-23623Table cell actions not available in WYSIWYG when inside macro with in-line editable contentOpenE3

68 more known issues affect every macro: see the Known issues.

Get Connected