wikimacroparameter
Audit
- Macro ID
- wikimacroparameter
- Source
- XS
- Type
- Generator
- Classification reason
- The macro has one parameter, the name of a parameter of the wiki macro whose code holds it, and no content that it uses, and what it displays is not typed in the macro: it stands for the value that the caller passes to the wiki macro call, and on a normal page its output is invisible. It is classified as a generator, like id and putFootnotes. It is not a wrapper, since the editable value belongs to the wiki macro call, not to the macro itself.
- Status
- Reviewed
- Criteria version
- 15.20
- XWiki version
- 18.8.0
- Audit date
- 2026-10-20
- Auditor
- Compared macros
- attachmentGalleryPicker putFootnotes
Sources
Where to gather the information the criteria are checked against, see Gather the sources.
| Other sources specific to this macro |
|---|
|
| Criterion | Result | Notes |
|---|---|---|
| D1 wording | KO | minor: "WikiMacro Parameter" is the macro ID spelled with capitals, and "WikiMacro" is the camel-case form of "wiki macro", the words the documentation and the editor use for this feature. A developer reads it, so technical words are fine, but the measure asks for no camelCase, and "Put Footnotes" is the same kind of ID split into words. The French and German names are the English one. |
| D2 summary | KO | minor: "Display editable parameter of a wikimacro." repeats the name and adds only "editable", and it spells "wikimacro" as one word. It does not say that the macro does something only in the code of a wiki macro, where it shows the value that the caller passes for the parameter, nor that the value is edited in place only for a parameter of type Wiki. On a normal page it renders nothing. The French and German descriptions are the English text, a matter for l10n.xwiki.org. |
| D3 category | KO | Development, but the macro only works in the code of a wiki macro, a code editor with no Quick Actions and no Insert Macro dialog, and renders nothing on a normal page, so it should be in the Internal category. Only the Internal and Deprecated categories are hidden from the Quick Actions menu and the Insert Macro dialog, for the users who do not display hidden pages; Development keeps it listed for every user. XWIKI-21063 names this macro. Once it is Internal, the criteria no longer require auditing it. |
| D4 quick-action | OK | with the audit fixtures left out of the ranks, whose names start with "WikiMacro Parameter" and are listed before the real entry, Quick Actions finds the macro first for "WikiMacro Parameter", "wikimacroparameter", "wiki macro parameter" and the synonym "parameter". The synonyms "macro argument", "display parameter" and "show parameter value" give no result. The French and German names are the English one, so no other language finds it by a different name, which is recorded as OK like wikimacrocontent, the missing translations being a matter for l10n.xwiki.org. The Insert Macro dialog does not search IDs, which is generic. |
| L1 consistency | OK | compared with attachmentGalleryPicker and putFootnotes: the Quick Action opens the Edit Macro dialog, since the name is mandatory and the macro shows nothing without it. A generator that needs a value to work is OK, like include. |
| L2 doc-parameters | KO | minor: the audited documentation is the new page Write a Macro in a Wiki Page, not the legacy tutorial that check_docs.py read, and the Documentation field is set to it. The page shows the call Hello {{wikimacroparameter name="greetUser" /}} in an Information box and says that a parameter value can be displayed on its own, with no script, which is enough to understand that name is the parameter of the wiki macro. It has no parameter table, so it does not say that name is mandatory, and the descriptor also shows a Content parameter that the page never mentions, see C1 of $content. The page Wiki Macros adds that the value is edited in place only for a parameter of type Wiki and in block position, CKEDITOR-248. |
| L3 doc-example | OK | the page example, Hello {{wikimacroparameter name="greetUser" /}} , is in a sentence of an Information box, not in a code block, so check_docs.py did not render it. Pasted in the Macro code of a wiki macro that has the parameter greetUser, it renders the greeting followed by the value, "Hello Ann" for a call with greetUser="Ann", with no error. Pasted on a normal page it renders only "Hello", which is not the use the macro is made for. |
| I1 pattern | OK | compared with children, the reference generator: a developer writes the call in the code field of the wiki macro, a plain code editor with no insertion behavior of its own. In the WYSIWYG editor the Quick Action "WikiMacro Parameter" opens the Edit Macro dialog with the focus on name, which is OK for a generator that needs a value, like include. |
| I2 zero-config | OK | the most common use is inside a wiki macro, where a call with the name of an existing parameter gives its value, and a call that does not set the parameter gives the rest of the wiki macro output, "Hello !" for the fixture, with no error. Inserted alone on a normal page, the macro shows nothing in view mode and the generic placeholder "macro:wikimacroparameter" in the editor, which is not the use it is made for. The dialog refuses an empty name without a message, which is the generic behavior of the Edit Macro dialog. |
| I3 instant | N/A | not applicable, generator. |
| I4 cursor | N/A | not applicable, generator. |
| I5 focus | OK | name is the only mandatory parameter, it is the first field of the dialog, has the focus and is visible with no scrolling. |
| E1 wysiwyg | OK | in the editor, a page calling the fixture shows the same text as in view mode, "Hello", the value, then "!", each in its own paragraph in both. The call of the macro itself is never shown, since it lives in the code of the wiki macro. The editor shows no in-place area for the value: with a parameter of type Wiki, in block position at the top level of the page, there is no editable area, the value "Ann bold" stays plain text in view mode and the editor marks it as java.lang.String, so nothing can be typed in the value, see the other notes. On a normal page the editor shows the generic placeholder "macro:wikimacroparameter" and the view mode shows nothing, which is not the use the macro is meant for. |
| E2 errors | KO | KO: a name that matches no parameter of the wiki macro is accepted silently and renders an empty placeholder with no message, for {{wikimacroparameter name="nope"/}} and {{wikimacroparameter name="greet User"/}} and {{wikimacroparameter name=""/}} in the code of a wiki macro, in view mode and in the editor. The name is matched without regard to case, so name="GREETUSER" shows the value of greetUser. A call with no name gives the error "Invalid macro parameters used for the [wikimacroparameter] macro. Cause: [Property [name] mandatory]", which names the parameter. A value with markup, <b>x</b> , is shown as text. A Content typed in the dialog, {{wikimacroparameter name="greetUser"}}text{{/wikimacroparameter}} , is accepted and ignored with no message. |
| E3 nesting | KO | minor: the fixture called in a list item, a table cell and a box renders with no error in view mode, the value in its own paragraph. In the editor the value is not edited in place in any of these places, nor at the top level, and nothing says why, see CKEDITOR-248 in the documentation. The direct call in a list item or a table cell renders an empty placeholder, which is the expected output outside a wiki macro. |
| E4 inline-support | OK | inline support is declared and works: the direct call in a sentence renders an empty span inside the sentence, and the fixture with inline support renders the value in the sentence with no error. The paragraph that wraps the value breaks the line, see the other notes. |
| E5 empty | N/A | not applicable, the macro has no content area. A related gap is not counted: a call of the wiki macro with no value for the parameter shows the wiki macro output with no area to type in, so the user who just inserted the wiki macro cannot type the value in place and has to use the Edit Macro dialog. This belongs to the wiki macro in the editor, like the empty content of wikimacrocontent. |
| E6 inplace | N/A | not applicable, the macro has no content to edit. The in-place editing of the parameter value that it is meant to enable is described under E1 and E3. |
Parameters
| Parameter | C1 clarity | C2 mandatory | C3 defaults | C4 input-assistance | C5 groups | C6 order | C7 alternatives | C8 advanced | C9 technical | C13 constraints | Notes |
|---|---|---|---|---|---|---|---|---|---|---|---|
| $content | KO | OK | N/A | OK | N/A | OK | N/A | N/A | N/A | N/A | C1, minor: the Edit Macro dialog shows a Content field, named "Content" with no description in English, and the macro ignores any content: its class declares an optional content with DefaultContentDescriptor(false) and execute() never reads it. Text typed in it is lost silently, see E2. C2: not mandatory, which is right since the macro does not use it. C4: a plain text area, the field type of any macro content. C6: after name, which is the field that matters. |
| name | KO | OK | OK | OK | OK | OK | N/A | OK | OK | OK | C1: the field is called "name" and its description is "name", the ID repeated, in every language. It does not say that it is the name of a parameter of the wiki macro whose code holds the call, nor that an unknown name shows nothing. Technical terms are fine for a developer macro, but a description that says nothing is a KO, like the one of the id of attachmentGalleryPicker. C2: name is mandatory and the macro shows nothing without it, which the dialog and the error "Property [name] mandatory" both say. C3: the field opens empty, which is fine for a mandatory first field with no value that suits most cases, since the name depends on the wiki macro. C4: a text field for the name of a parameter. A picker of the parameters of the wiki macro would need the context of the wiki macro, which neither the dialog nor the Macro code editor has, so a text field is OK. C5: two fields in the group, name and Content. C6: name is the first field and has the focus. C7: not applicable, no alternative parameters. C8: name is set by the most common example, so it is not advanced. C9: a parameter with a realistic use, set by the documentation example. C13: a free identifier with no range or format to declare, matched without regard to case. An unknown name is counted under E2. |
Other notes
Use: the most common use is inside the code of a wiki macro, never on a normal page. A developer types the call in the Macro code field, a CodeMirror text area with no Quick Actions and no Insert Macro dialog. The audited fixtures, all in the MacroAudit space, are the wiki macro WikiMacroParameterFixture with the code Hello {{wikimacroparameter name="greetUser" /}}! and the parameter greetUser, called as {{wikimacroparameterfixture greetUser="Ann"/}} , and the same wiki macro with a parameter of type Wiki, WikiMacroParameterWikiFixture, block only, and WikiMacroParameterWikiInlineFixture, inline. The probe on the bare macro on a normal page, and the errors of its nesting cases ("Property [name] mandatory"), come from inserting the macro without its mandatory name and are not the use.
Other notes, bug outside the criteria: the value of the parameter is wrapped in a paragraph even in a sentence, so Hello {{wikimacroparameter name="greetUser" /}}! renders as <p>Hello <p>Ann</p>!</p> , which browsers display on three lines. In the editor, typing in that value inside a sentence moved the typed text out of the macro and split the macro markers over two paragraphs in the saved content, tested once with the inline fixture. The macro also declares an optional content with DefaultContentDescriptor(false) that it ignores, so the Edit Macro dialog shows a Content field that does nothing.
Bug outside the criteria, to confirm: a parameter of type java.util.List<org.xwiki.rendering.block.Block> (Wiki) of a wiki macro is rendered as plain text by {{wikimacroparameter/}} and marked java.lang.String for the editor, so it cannot be edited in place as the documentation describes. Seen with the fixture MacroAudit.WikiMacroParameterWikiFixture: greetUser="Ann **bold**" renders the asterisks.
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.
| KO | Criterion | Existing tickets | New tickets |
|---|---|---|---|
| D1 | D1 wording | XWIKI-25489 | |
| D2 | D2 summary | XWIKI-25489 | |
| D3 | D3 category | XWIKI-21063 | |
| L2 | L2 doc-parameters | XINFRA-525 | |
| E2 | E2 errors | XCOMMONS-3847 (partial), XRENDERING-823 (partial), XWIKI-25578 (partial) | |
| E3 | E3 nesting | CKEDITOR-248 (partial) | XWIKI-25489 (partial) |
| C1:$content | C1 clarity, $content | XWIKI-25489 | |
| C1:name | C1 clarity, name | XWIKI-25489 |
Tickets
| Ticket | Origin | KOs covered | KOs partly covered |
|---|---|---|---|
| CKEDITOR-248 | Existing | E3 | |
| XWIKI-21063 | Existing | D3 | |
| XCOMMONS-3847 | New | E2 | |
| XRENDERING-823 | New | E2 | |
| XWIKI-25489 | New | C1:$content C1:name D1 D2 | E3 |
| XINFRA-525 | New | L2 | |
| XWIKI-25578 | New | E2 |
Known issues of this macro
No known issue is specific to this macro.
68 more known issues affect every macro: see the Known issues.
Lucas Charpentier