Include macro doesn't work when special characters are used in the page title

When trying to include a page with special characters I get an error:

Unable to render {include} The included page could not be found.

For instance using the include macro to include a page titled: Special Character Test :"<>?,./;'[]{}!@#$%^&*()_+=-\][

will not render.

4 answers

This widget could not be displayed.
Hi, An alternative to the standard include macro would be to use Reporting in this case. It may handle the special characters better. If you follow this link (http://confluence.atlassian.com/display/DOC/Excerpt+Include+Macro?focusedCommentId=277250731#comment-277250731) you'll see details of how to use report-info macro to pull back a specific excerpt, or indeed, the entire contents of a page. If this doesn't work then I'd suggest a user macro could achieve your goal, provided you pass the page ID to indicate the page you're interested in. Hope this helps, Charles
This widget could not be displayed.

Doubled check on this and it seems to be a limitation of include page macro. However, the above suggestion might be possible.

This widget could not be displayed.

This issue is resolved in Confluence 5.5: https://jira.atlassian.com/browse/CONF-24785

Great news!

This widget could not be displayed.

We ran into this problem, too, so I did as CharlesH mentioned and wrote a user macro to include a page based on the page ID. Maybe it will also be helpful for someone else who could not yet upgrade to 5.5.

## @param PageToInclude:title=Page ID of page to include|type=string|required=true
#set ( $Long = $generalUtil.getSystemStartupTime() )
#set ( $pageId = $Long.parseLong($paramPageToInclude) )
#set ( $page = $pageManager.getPage($pageId) )
#set ( $pageContent = "Page not Found" )
#set ( $pageContent = $page.getBodyAsString() )
$pageContent

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

133 views 1 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you