Include macro does not work in templates

Michael Roff
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 7, 2012

I have a template that uses the include macro.

When the template is used, the include macro does not render.

The following error message is displayed: Unable to render {include} The included page could not be found.

The page name I am using is correct. I have tried using the space abbreviation in the page name also and this doesn't help.

If I take the same code out of the template and insert it into the page, then it works fine.

It seems to me that the include macro does not work proberly in the templates in Confluence 4.

I am using C v4.1.9.

Does anyone else have this problem?

Can anyone from Atlassian reproduce this issue?

5 answers

0 votes
Bernard July 10, 2020

Sort of the same issue here ..

The plugin works by inserting the macro into a page. The page renderes correctly

However : 

whenever the macro is used in a template, the setting of the include macro is not saved into that template. Reopening the template show an empty macro (no setting). 

0 votes
ritu jain April 7, 2020

I have also encountered the same issue. I have a customized template in that I used Include-Page Macro, now when I am creating new pages using that template I am getting that Unable to rendor{include} macro error.

even when I go back to my template I see include-page macro doesnt have the page name. 

0 votes
Michael Roff
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 8, 2012

So the plot thickens ......... :)

If you create a page, then create a template which includes that page and then create a new page from the template, it works.

BUT

If you create a page, which in turn creates a child page using the "create-page" plugin, then if you try and use the include plugin on the child page, it throws an error as above.

Something is not registering properly in the create-page plugin I expect.

Anyone from Adaptavist wish to comment?

0 votes
Michael Roff
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 8, 2012

Thanks Jonathan, we have just upgraded to Confluence 4.3 to test it out - this makes things a little different with the new template system.

I don't think there was anything special about my template or the page it was including.

I will repeat the problem and send through the details once we have reverted back to Confluence 4.1.9.

0 votes
Jonathan Simonoff
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 7, 2012

I just tried (with 4.0.4) and it works fine.

Can you copy your template code here?

Suggest an answer

Log in or Sign up to answer