Upgrade Notes for Fixing Template Not Found Error

Template not found error

When upgrading to Crafter CMS version 3.1.15 or later, if a user encounters the following error:

freemarker.template.TemplateNotFoundException: Template not found for name "static-assets/app/js/js.hash"

This means your application is using templates that are outside of the templates folder.

The following Engine Site configuration property or global server-config.properties property needs to be added to allow templates to be loaded outside of the templates folder:

  • For files that applies to all your sites in Crafter CMS, add your file/s path to the crafter.engine.site.default.templates.allowed.paths property in the server-config.properties file

    # List of regular expressions to allow templates to be loaded outside of the templates folder, separated by comma

  • For site specific files, add your file/s path to your Engine site configuration file