Error... can't evaluate field IsMultiLingual

Hi,

I’ve wanted to publish my site again/deploy a post when hugo starts to complain with this error message:

Error: error building site: render: failed to render pages: render of “term” failed: execute of template failed: template: partials/layout/header.html:25:9: executing “header” at : can’t evaluate field IsMultiLingual in type interface {}

The code is:

  // This is line 25
  {{ if hugo.IsMultiLingual }}
      <li class="nav-item nav-item-lang nav-item-{{ $.Site.Language }} dropdown lang-switch-desktop">
          <a href="some.link.stuff"...>Link</a>
      </li>
  {{ end }}

I was already involved in a discussion about this, but back then the problem-child was Site.IsMultilingual which was replaced by hugo.IsMultiLingual (I hope to remember correct).

So, I consider my code to be correct but maybe feel that this is a Hugo issue?

https://gohugo.io/functions/hugo/ismultilingual

Check your hugo version.