It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

#include not working?

Matthew J. Horn Apr 26, 2012

I tried to add the following line to my Main Layout template:


I checked that the file exists, that the path is correct, and that the contents are innocuous, but I still get the error:

Error occurred during template rendering: Cannot process content resource. Contact your administrator for assistance.

Any ideas?

2 answers

0 votes
David Simpson Community Leader Apr 30, 2012

If this is a plugin, ensure that the file is found at resources/confluence/includes/test-include.txt within your plugin.

You could also try #parse("/confluence/includes/test-include.txt") instead, but that's likely to fail too if you don't get the path correct.

If you're doing stuff directly in the Confluence installation directory, first of all, don't as it will cause you pain on upgrade, secondly, where are you adding the file?


Matthew J. Horn Apr 30, 2012

It's not a plugin. I am trying to do an include from the Main Layout decorator in one of my spaces.

I added the file here: C:\confluence\confluence-3.5.9-std\confluence\includes

I've read the Velocity docs, but also found this bug:

This basically says that include does not work in the admin area. The problem with the suggested fix in that bug is that to use the patch you need to compile from the source and then redeploy Confluence, which is basically over my head at this point.

I thought it might be a pathing issue, but I've used absolute paths as well and still get the error.

0 votes
David Simpson Community Leader May 20, 2012

If you're doing this for an updated theme, why not just create a plugin -- it is surely a simpler workaround.

Also, I'd say that it's bad practice to add your own files to the installation directory -- means that upgrade is slightly harder.

Matthew J. Horn May 20, 2012

Agreed. I havent created a plugin yet, so maybe now is a good time to do so. Thanks!

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

6 Awesome Ways to Apply Trello, JIRA and Confluence to your Project

I attended  Atlassian Summit 2019  and learned a lot from the presenters, attendees and knowledgeable Atlassian product managers. The presentations I attended focused on applying Agile, pla...

1,532 views 8 19
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you