"ResourceManager : unable to find resource" error in templates
Problem
Since Jira 10 every velocity file and method invocation needs to be explicitly allowlisted. One of the errors that can occur because of this is the org.apache.velocity.exception.ResourceNotFoundException that comes from the #parse() method of the velocity engine.
org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'templates/email/custom/template.vm'You should see this in the logs when you are trying to parse a custom template from the file system, since these templates are not whitelisted.
Solution
There are 2 workarounds for this issue:
You can copy and paste the content of these custom templates into Email This Issue templates and render them with the #renderTemplate() method. https://docs.meta-inf.hu/email-this-issue/email-this-issue-for-jira-server-data-center/documentation/outgoing-emails/email-templates/rendering-templates-within-templates
You can manuanlly allowlist these templates by opening velocity-default.properties in atlassian-jira\WEB-INF\classes and pasting the path of your custom template under the resource.loader.file.allowlist(around line 400). Once you are done it should look something like:
resource.loader.file.allowlist = templates/topnavigation/referencetopnav.vm, \ (...) templates/email/custom/template.vm, \ (...)When you save the file aftermodifying it you should be able to parse these templates. This action doesn’t require a Jira update.