It's not the same without you
Join the community to find out what other Atlassian users are discussing, debating and creating.
I tried to add the following line to my Main Layout template:
#include("/confluence/includes/test-include.txt")
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?
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?
See:
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:
https://jira.atlassian.com/browse/CONF-22849
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.
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.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.
Read moreHi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...
Connect with like-minded Atlassian users at free events near you!
Find a groupConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.
Start an AUGYou're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.