Confluence Documentation

Confluence Latest 
Confluence 5.3 Documentation 
Confluence 5.2 Documentation 
Confluence 5.1 Documentation 


Search the Confluence Knowledge Base

You're visiting the Confluence Knowledge Base. Visit the Confluence Knowledge Base Home for an overview.

Skip to end of metadata
Go to start of metadata


If you attempt to create a page from a Confluence Page Template that contains the {attachments} macro and one or more page template variables, Confluence is unable to create the page and an error message is generated after you click on the Insert Variables button.

The error message generated is similar to this:


This error happens because the {attachments} macro assumes that it is only ever rendered in the context of a Confluence Page. The macro causes the error when it is rendered in the "Draft" mode required for the user to enter in the page template variable values.


A suggested workaround for this problem is to write a user macro that includes the {attachments} macro in pages, but does not include the {attachments} macro in drafts. Information on creating user macros can be found in the Confluence Writing User Macros guide. You can then update your page templates to use this new user macro, instead of using the {attachments} macro directly.

Here is an example of a user macro that would solve this problem:

When creating and saving the macro, make sure that the Output is set to Macro generates wiki markup.


  1. For Confluence 4 and above, the user macro should be as follows:

    The Macro Body Processing should be 

  2. When will this issue be fixed?