include
Audit
- Macro ID
- include
- Source
- XS
- Type
- Generator
- Classification reason
- Status
- Reviewed
- Criteria version
- 15.20
- XWiki version
- 18.8.0
- Audit date
- 2026-10-16
- Auditor
- Compared macros
- display children
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 | OK | |
| D2 summary | KO | minor: the description "Include other pages into the current page." says what the macro adds, but it is the same sentence as the Display macro, "Display other pages into the current page.", so it does not tell a user which of the two to pick. |
| D3 category | OK | Content, the same category as display; children is in Navigation, a different kind of generator. |
| D4 quick-action | KO | "include" and "Include" give the Quick Actions entry "Include Page" first, and the French "Inclure" gives "Inclure une page" first. The synonyms "embed", "transclude" and "reuse" do not find it: "embed" gives the Embed macro and the Image and Icon entries, "transclude" gives nothing, "reuse" gives Jira chart macros. |
| L1 consistency | OK | compared with display and children. None of them has content. Include and display both open the Edit Macro dialog on insertion, with the page to include as the only required field, and share the same defaults; children is inserted right away since it needs no target. The extra author parameter of include is by design. |
| L2 doc-parameters | KO | the parameters are documented only on the legacy extensions.xwiki.org page, https://extensions.xwiki.org/xwiki/bin/view/Extension/Include%20Macro, not in the new documentation. That page also gives "document" as the only allowed value of type, while the macro accepts 13 entity types. |
| L3 doc-example | KO | no documentation example shows the most common use: the Usage section starts with {{include page="page1/page2"/}} , which uses the hidden page parameter, while nearly all the include calls of XWiki itself use reference; the reference form only comes as Example 4, {{include reference="Page1.Page2.WebHome" /}} , pointing at a page that does not exist. The audit uses {{include reference="Sandbox.TestPage1"/}} . |
| I1 pattern | OK | compared with children, the reference generator, and display. From the Quick Actions menu, the "Include Page" entry opens the Edit Macro dialog, where children is inserted right away: include needs a page to include, and display behaves the same way. From the Insert Macro dialog, the same Edit Macro dialog opens. |
| I2 zero-config | OK | submitting the Edit Macro dialog with the default values does nothing: the required Page field is empty and the dialog stays open with no message, which is the generic behavior of the dialog. {{include/}} typed in the source gives "Invalid macro parameters used for the [include] macro. Cause: [Property [page:reference] mandatory]." in view mode, acceptable for a generator that needs its target. |
| I3 instant | N/A | |
| I4 cursor | N/A | |
| I5 focus | OK | the required Reference group with its Page picker comes first, visible without scrolling, and the focus is on the Page field. |
| E1 wysiwyg | OK | the included page looks the same in the editor and in view mode. |
| E2 errors | KO | invalid values are accepted silently or give a message that does not name the parameter. {{include reference="Sandbox.TestPage1" excludeFirstHeading="maybe"/}} is read as false. {{include reference="Sandbox.TestPage1" type="SPACE"/}} renders nothing, and {{include reference="Sandbox.TestPage1" type="ATTACHMENT"/}} gives "Found recursive inclusion of document [Attachment xwiki:...]", a wrong cause. {{include reference="Sandbox.TestPage1" type="foo"/}} lists the allowed values but does not name the type parameter. {{include reference="NoSuchPage"/}} renders nothing, which is a valid use, for a page created later; the editor could show that the page does not exist yet. |
| E3 nesting | OK | the example renders and can be edited in a list item, in a table cell and in a box. The macro has no content. |
| E4 inline-support | OK | the macro declares inline support. Including inside a sentence a page whose content is the single line "Hello inline world", Before {{include reference="Target"/}} after. , renders on the same line. A page with headings or several paragraphs, like the example, breaks the sentence since its content cannot be inline, with no message. |
| E5 empty | N/A | |
| E6 inplace | N/A |
Parameters
| Parameter | C1 clarity | C2 mandatory | C3 defaults | C4 input-assistance | C5 groups | C6 order | C7 alternatives | C8 advanced | C9 technical | C13 constraints | Notes |
|---|---|---|---|---|---|---|---|---|---|---|---|
| author | KO | OK | OK | OK | OK | OK | N/A | OK | OK | N/A | C1: the name is shown as "Author." with a trailing period, and the description "The author to use to execute the content when context is "Current"." refers to the context parameter, which is deprecated and hidden from the dialog, and does not explain the values Auto, Current and Target or that they decide the rights the included content runs with. Open the Edit Macro dialog of {{include reference="Sandbox.TestPage1"/}} , Optional parameters. C9: realistic use: running the included content with the rights of the current page instead of those of the included page. |
| context | N/A | OK | N/A | N/A | N/A | N/A | N/A | N/A | OK | N/A | C9: deprecated, hidden from the Edit Macro dialog unless the macro already sets it. |
| document | N/A | OK | N/A | N/A | N/A | N/A | OK | N/A | OK | N/A | C9: deprecated, hidden from the Edit Macro dialog unless the macro already sets it, where it is offered as a third alternative of the Reference feature. |
| excludeFirstHeading | OK | OK | OK | OK | OK | OK | N/A | OK | OK | N/A | |
| page | KO | OK | N/A | KO | N/A | N/A | OK | N/A | OK | N/A | C1, minor: hidden, but shown when the macro already sets it, like the first example of the documentation, {{include page="Sandbox/TestPage1"/}} . The Edit Macro dialog of that macro then shows two alternatives named "Page" with the same description "The reference of the page to include.", page and reference, with no way to tell them apart. C4, minor: in the same case, a plain text field, while the reference alternative next to it has a page picker. C9: hidden from the dialog of a new macro. |
| reference | OK | OK | OK | OK | OK | OK | OK | OK | OK | N/A | C2: not mandatory itself, but it is the only shown alternative of the required Reference feature; no default makes sense, the current page would include itself. C4: a page picker that finds the page by its title, its name or its reference, and also accepts a typed reference. |
| section | KO | OK | OK | KO | OK | OK | N/A | OK | OK | N/A | C1: the description "An optional id of a section to include in the specified page." does not say that the id is "H" followed by the heading title without spaces, like HMySection, so the user cannot guess what to type. The German description explains it. C4: a plain text field where the user must type a generated heading id, while the headings of the chosen page could be offered in a picker: to include the "My Heading" section the user has to work out and type {{include reference="Page1.Page2" section="HMyHeading"/}} , and a heading with accented letters gives an id with hexadecimal codes, like HCafE9. C6: used by one example of the documentation, but listed last in the Optional parameters, after Author, which no example uses. The most common example sets only the page, which comes first, so the order is OK. |
| type | N/A | OK | N/A | N/A | N/A | N/A | N/A | N/A | OK | N/A | C9: hidden from the Edit Macro dialog; the Page picker sets the reference type. |
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 |
|---|---|---|---|
| D2 | D2 summary | XWIKI-25477 | |
| D4 | D4 quick-action | XWIKI-25444 | |
| L2 | L2 doc-parameters | XINFRA-525 | |
| L3 | L3 doc-example | XINFRA-526 | |
| E2 | E2 errors | XCOMMONS-3847 (partial), XRENDERING-823 (partial), XWIKI-25578 (partial) | |
| C1:author | C1 clarity, author | XWIKI-25477 | |
| C1:page | C1 clarity, page | XWIKI-25477 | |
| C4:page | C4 input-assistance, page | XWIKI-25576 | |
| C1:section | C1 clarity, section | XWIKI-25477 | |
| C4:section | C4 input-assistance, section | XWIKI-23045 (partial) | XWIKI-25501 |
Tickets
| Ticket | Origin | KOs covered | KOs partly covered |
|---|---|---|---|
| XCOMMONS-3847 | New | E2 | |
| XRENDERING-823 | New | E2 | |
| XWIKI-25444 | New | D4 | |
| XWIKI-25477 | New | C1:author C1:page C1:section D2 | |
| XWIKI-23045 | Existing | C4:section | |
| XWIKI-25501 | New | C4:section | |
| XINFRA-525 | New | L2 | |
| XINFRA-526 | New | L3 | |
| XWIKI-25576 | New | C4:page | |
| XWIKI-25578 | New | E2 |
Known issues of this macro
| Issue | Title | Status | Criteria |
|---|---|---|---|
| XRENDERING-49 | Include macro within a box macro doesn't show the page as "included" | Open | E1 |
| XRENDERING-517 | Invalid HTML generated when a macro that is called inline produces block level content | Open | E4 |
| XWIKI-13363 | Remove deprecated macro parameters from the Wysiwyg macro wizard | Open | C9 |
| XWIKI-13997 | Page/editor corruption caused by inlined display/include macro that references block content | Open | E4 |
| XWIKI-20634 | Suggestions of the page picker in macro parameters display under the modal when used on the dashboard editor | Open | C4 |
| XWIKI-20944 | Include macro fails to execute when no reference is specified | Closed | C7 |
| XWIKI-22690 | Translation keys missing for macro ‚display‘ and ‚include‘ | Open | C1 |
68 more known issues affect every macro: see the Known issues.
Lucas Charpentier