Friday 22 January 2021

Fortis - Unable to find template error

I was upgrading my client's Sitecore instance lately and at some point I've spotted this issue with Fortis:

Fortis | Unable to find template for MyProject.Model.IMyTemplate

After doing some digging in the internet I couldn't find out what was causing it. I decided to compare all config files and I've spotted that my Web.config on new environment is missing these bits:

Declaration of Fortis section in  <configSections>

<configSections>
...
    <section name="fortis" type="System.Configuration.NameValueSectionHandler" />
...
</configSections>

...and the actual section my Model project assembly reference:

<fortis>
    <add key="assembly" value="MyProject.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</fortis>


With these added it all worked. I hope this will help somebody!